home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / midas060 / doc / latex / prgguide.tex < prev   
LaTeX Document  |  1997-01-26  |  32.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Croteam texture file (image/croteamTextureFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX 2e document text default
99% file LaTeX document text default
98% file LaTeX document, ASCII text, with CRLF line terminators default
100% TrID LaTeX 2e document (with rem) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[CRLF] default (weak)
100% xdgMime text/x-matlab default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 54 68 69 73 20 69 | 73 20 6d 34 20 73 6f 75 |% This i|s m4 sou|
|00000010| 72 63 65 20 63 6f 64 65 | 20 66 6f 72 20 74 68 65 |rce code| for the|
|00000020| 20 64 6f 63 75 6d 65 6e | 74 20 69 6e 20 4c 61 54 | documen|t in LaT|
|00000030| 65 58 20 2e 20 6d 34 20 | 69 73 20 6a 75 73 74 20 |eX . m4 |is just |
|00000040| 75 73 65 64 0d 0a 25 20 | 66 6f 72 20 69 6e 63 6c |used..% |for incl|
|00000050| 75 64 69 6e 67 20 73 6f | 6d 65 20 66 69 6c 65 73 |uding so|me files|
|00000060| 20 2d 20 6c 61 74 65 78 | 32 68 74 6d 6c 20 64 6f | - latex|2html do|
|00000070| 65 73 6e 27 74 20 70 72 | 6f 63 65 73 73 20 6d 61 |esn't pr|ocess ma|
|00000080| 63 72 6f 73 20 69 6e 20 | 74 68 65 6d 0d 0a 25 20 |cros in |them..% |
|00000090| 6f 74 68 65 72 77 69 73 | 65 2e 20 4e 6f 74 65 20 |otherwis|e. Note |
|000000a0| 20 62 65 6c 6f 77 2e 0d | 0a 0d 0a 0d 0a 5c 64 6f | below..|.....\do|
|000000b0| 63 75 6d 65 6e 74 63 6c | 61 73 73 5b 61 34 70 61 |cumentcl|ass[a4pa|
|000000c0| 70 65 72 2c 31 32 70 74 | 2c 6f 6e 65 73 69 64 65 |per,12pt|,oneside|
|000000d0| 5d 7b 62 6f 6f 6b 7d 0d | 0a 0d 0a 5c 75 73 65 70 |]{book}.|...\usep|
|000000e0| 61 63 6b 61 67 65 7b 68 | 74 6d 6c 7d 0d 0a 0d 0a |ackage{h|tml}....|
|000000f0| 25 62 65 67 69 6e 7b 6c | 61 74 65 78 6f 6e 6c 79 |%begin{l|atexonly|
|00000100| 7d 0d 0a 0d 0a 25 20 4e | 6f 20 70 61 72 61 67 72 |}....% N|o paragr|
|00000110| 61 70 68 20 69 6e 64 65 | 6e 74 2c 20 61 62 6f 75 |aph inde|nt, abou|
|00000120| 74 20 31 30 70 74 20 6f | 66 20 73 70 61 63 65 20 |t 10pt o|f space |
|00000130| 62 65 74 77 65 65 6e 20 | 74 68 65 6d 3a 0d 0a 0d |between |them:...|
|00000140| 0a 5c 73 65 74 6c 65 6e | 67 74 68 7b 5c 70 61 72 |.\setlen|gth{\par|
|00000150| 69 6e 64 65 6e 74 7d 7b | 30 70 74 7d 0d 0a 5c 73 |indent}{|0pt}..\s|
|00000160| 65 74 6c 65 6e 67 74 68 | 7b 5c 70 61 72 73 6b 69 |etlength|{\parski|
|00000170| 70 7d 7b 31 30 70 74 20 | 70 6c 75 73 20 32 70 74 |p}{10pt |plus 2pt|
|00000180| 20 6d 69 6e 75 73 20 31 | 70 74 7d 0d 0a 0d 0a 25 | minus 1|pt}....%|
|00000190| 20 55 6e 64 65 6e 74 20 | 6f 75 72 20 68 65 61 64 | Undent |our head|
|000001a0| 69 6e 67 73 20 61 20 6c | 69 74 74 6c 65 20 62 69 |ings a l|ittle bi|
|000001b0| 74 3a 0d 0a 0d 0a 5c 6d | 61 6b 65 61 74 6c 65 74 |t:....\m|akeatlet|
|000001c0| 74 65 72 0d 0a 5c 72 65 | 6e 65 77 63 6f 6d 6d 61 |ter..\re|newcomma|
|000001d0| 6e 64 5c 73 65 63 74 69 | 6f 6e 7b 5c 40 73 74 61 |nd\secti|on{\@sta|
|000001e0| 72 74 73 65 63 74 69 6f | 6e 20 7b 73 65 63 74 69 |rtsectio|n {secti|
|000001f0| 6f 6e 7d 7b 31 7d 7b 2d | 32 30 70 74 7d 25 0d 0a |on}{1}{-|20pt}%..|
|00000200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000220| 20 20 20 7b 2d 33 2e 35 | 65 78 20 5c 40 70 6c 75 | {-3.5|ex \@plu|
|00000230| 73 20 2d 31 65 78 20 5c | 40 6d 69 6e 75 73 20 2d |s -1ex \|@minus -|
|00000240| 2e 32 65 78 7d 25 0d 0a | 20 20 20 20 20 20 20 20 |.2ex}%..| |
|00000250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000260| 20 20 20 20 20 20 20 20 | 20 20 20 7b 32 2e 33 65 | | {2.3e|
|00000270| 78 20 5c 40 70 6c 75 73 | 2e 32 65 78 7d 25 0d 0a |x \@plus|.2ex}%..|
|00000280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002a0| 20 20 20 7b 5c 6e 6f 72 | 6d 61 6c 66 6f 6e 74 5c | {\nor|malfont\|
|000002b0| 4c 61 72 67 65 5c 62 66 | 73 65 72 69 65 73 7d 7d |Large\bf|series}}|
|000002c0| 0d 0a 5c 72 65 6e 65 77 | 63 6f 6d 6d 61 6e 64 5c |..\renew|command\|
|000002d0| 73 75 62 73 65 63 74 69 | 6f 6e 7b 5c 40 73 74 61 |subsecti|on{\@sta|
|000002e0| 72 74 73 65 63 74 69 6f | 6e 7b 73 75 62 73 65 63 |rtsectio|n{subsec|
|000002f0| 74 69 6f 6e 7d 7b 32 7d | 7b 2d 32 30 70 74 7d 25 |tion}{2}|{-20pt}%|
|00000300| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00000310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000320| 20 20 20 20 20 20 20 7b | 2d 33 2e 32 35 65 78 5c | {|-3.25ex\|
|00000330| 40 70 6c 75 73 20 2d 31 | 65 78 20 5c 40 6d 69 6e |@plus -1|ex \@min|
|00000340| 75 73 20 2d 2e 32 65 78 | 7d 25 0d 0a 20 20 20 20 |us -.2ex|}%.. |
|00000350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000370| 20 7b 31 2e 35 65 78 20 | 5c 40 70 6c 75 73 20 2e | {1.5ex |\@plus .|
|00000380| 32 65 78 7d 25 0d 0a 20 | 20 20 20 20 20 20 20 20 |2ex}%.. | |
|00000390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000003a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 5c 6e 6f | | {\no|
|000003b0| 72 6d 61 6c 66 6f 6e 74 | 5c 6c 61 72 67 65 5c 62 |rmalfont|\large\b|
|000003c0| 66 73 65 72 69 65 73 7d | 7d 0d 0a 5c 72 65 6e 65 |fseries}|}..\rene|
|000003d0| 77 63 6f 6d 6d 61 6e 64 | 5c 73 75 62 73 75 62 73 |wcommand|\subsubs|
|000003e0| 65 63 74 69 6f 6e 7b 5c | 40 73 74 61 72 74 73 65 |ection{\|@startse|
|000003f0| 63 74 69 6f 6e 7b 73 75 | 62 73 75 62 73 65 63 74 |ction{su|bsubsect|
|00000400| 69 6f 6e 7d 7b 33 7d 7b | 2d 32 30 70 74 7d 25 0d |ion}{3}{|-20pt}%.|
|00000410| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000430| 20 20 20 20 20 20 7b 2d | 33 2e 32 35 65 78 5c 40 | {-|3.25ex\@|
|00000440| 70 6c 75 73 20 2d 31 65 | 78 20 5c 40 6d 69 6e 75 |plus -1e|x \@minu|
|00000450| 73 20 2d 2e 32 65 78 7d | 25 0d 0a 20 20 20 20 20 |s -.2ex}|%.. |
|00000460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000480| 7b 31 2e 35 65 78 20 5c | 40 70 6c 75 73 20 2e 32 |{1.5ex \|@plus .2|
|00000490| 65 78 7d 25 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |ex}%.. | |
|000004a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004b0| 20 20 20 20 20 20 20 20 | 20 20 20 7b 5c 6e 6f 72 | | {\nor|
|000004c0| 6d 61 6c 66 6f 6e 74 5c | 6e 6f 72 6d 61 6c 73 69 |malfont\|normalsi|
|000004d0| 7a 65 5c 62 66 73 65 72 | 69 65 73 7d 7d 0d 0a 5c |ze\bfser|ies}}..\|
|000004e0| 6d 61 6b 65 61 74 6f 74 | 68 65 72 0d 0a 0d 0a 25 |makeatot|her....%|
|000004f0| 65 6e 64 7b 6c 61 74 65 | 78 6f 6e 6c 79 7d 0d 0a |end{late|xonly}..|
|00000500| 0d 0a 25 20 41 20 63 6f | 6f 6c 20 64 6f 63 75 6d |..% A co|ol docum|
|00000510| 65 6e 74 61 74 69 6f 6e | 20 65 6e 74 72 79 20 70 |entation| entry p|
|00000520| 61 67 65 20 2d 20 64 65 | 73 63 72 69 62 65 73 20 |age - de|scribes |
|00000530| 61 20 73 69 67 6c 65 20 | 77 68 61 74 65 76 65 72 |a sigle |whatever|
|00000540| 2c 20 73 74 61 72 74 69 | 6e 67 20 61 0d 0a 25 20 |, starti|ng a..% |
|00000550| 6e 65 77 20 73 75 62 73 | 65 63 74 69 6f 6e 20 61 |new subs|ection a|
|00000560| 6e 64 20 69 6e 73 65 72 | 74 69 6e 67 20 61 20 6c |nd inser|ting a l|
|00000570| 61 62 65 6c 20 61 6e 64 | 20 69 6e 64 65 78 20 65 |abel and| index e|
|00000580| 6e 74 72 79 20 70 6f 69 | 6e 74 20 69 6e 20 74 68 |ntry poi|nt in th|
|00000590| 65 20 70 72 6f 63 65 73 | 73 3a 0d 0a 5c 6e 65 77 |e proces|s:..\new|
|000005a0| 63 6f 6d 6d 61 6e 64 7b | 5c 6d 44 6f 63 45 6e 74 |command{|\mDocEnt|
|000005b0| 72 79 7d 5b 31 5d 7b 5c | 6e 65 77 70 61 67 65 5c |ry}[1]{\|newpage\|
|000005c0| 68 74 6d 6c 72 75 6c 65 | 5c 6c 61 62 65 6c 7b 23 |htmlrule|\label{#|
|000005d0| 31 7d 5c 73 75 62 73 65 | 63 74 69 6f 6e 7b 23 31 |1}\subse|ction{#1|
|000005e0| 7d 5c 69 6e 64 65 78 7b | 23 31 7d 7d 0d 0a 0d 0a |}\index{|#1}}....|
|000005f0| 25 20 41 20 6c 61 6e 67 | 75 61 67 65 20 72 65 73 |% A lang|uage res|
|00000600| 65 72 76 65 64 20 77 6f | 72 64 20 2d 20 22 65 6e |erved wo|rd - "en|
|00000610| 75 6d 22 2c 20 22 74 79 | 70 65 64 65 66 22 20 61 |um", "ty|pedef" a|
|00000620| 6e 64 20 73 75 63 68 3a | 0d 0a 5c 6e 65 77 63 6f |nd such:|..\newco|
|00000630| 6d 6d 61 6e 64 7b 5c 6d | 52 65 73 57 6f 72 64 7d |mmand{\m|ResWord}|
|00000640| 5b 31 5d 7b 7b 5c 74 74 | 66 61 6d 69 6c 79 20 23 |[1]{{\tt|family #|
|00000650| 31 7d 7d 0d 0a 0d 0a 25 | 20 41 20 66 69 6c 65 20 |1}}....%| A file |
|00000660| 6e 61 6d 65 3a 0d 0a 5c | 6e 65 77 63 6f 6d 6d 61 |name:..\|newcomma|
|00000670| 6e 64 7b 5c 6d 46 69 6c | 65 4e 61 6d 65 7d 5b 31 |nd{\mFil|eName}[1|
|00000680| 5d 7b 7b 5c 74 74 66 61 | 6d 69 6c 79 20 23 31 7d |]{{\ttfa|mily #1}|
|00000690| 7d 0d 0a 0d 0a 25 20 41 | 20 76 61 72 69 61 62 6c |}....% A| variabl|
|000006a0| 65 2c 20 73 74 72 75 63 | 74 75 72 65 20 6d 65 6d |e, struc|ture mem|
|000006b0| 62 65 72 20 6f 72 20 61 | 72 67 75 6d 65 6e 74 3a |ber or a|rgument:|
|000006c0| 0d 0a 5c 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 6d |..\newco|mmand{\m|
|000006d0| 56 61 72 69 61 62 6c 65 | 7d 5b 31 5d 7b 7b 5c 62 |Variable|}[1]{{\b|
|000006e0| 66 20 23 31 7d 7d 0d 0a | 0d 0a 25 20 41 20 6c 61 |f #1}}..|..% A la|
|000006f0| 62 65 6c 20 61 6e 64 20 | 69 6e 64 65 78 20 65 6e |bel and |index en|
|00000700| 74 72 79 3a 0d 0a 5c 6e | 65 77 63 6f 6d 6d 61 6e |try:..\n|ewcomman|
|00000710| 64 7b 5c 6d 4c 61 62 65 | 6c 7d 5b 31 5d 7b 5c 6c |d{\mLabe|l}[1]{\l|
|00000720| 61 62 65 6c 7b 23 31 7d | 5c 69 6e 64 65 78 7b 23 |abel{#1}|\index{#|
|00000730| 31 7d 7d 0d 0a 0d 0a 25 | 20 52 65 66 65 72 65 6e |1}}....%| Referen|
|00000740| 63 65 20 74 6f 20 61 20 | 64 6f 63 75 6d 65 6e 74 |ce to a |document|
|00000750| 20 65 6e 74 72 79 3a 0d | 0a 25 62 65 67 69 6e 7b | entry:.|.%begin{|
|00000760| 6c 61 74 65 78 6f 6e 6c | 79 7d 0d 0a 5c 6e 65 77 |latexonl|y}..\new|
|00000770| 63 6f 6d 6d 61 6e 64 7b | 5c 6d 44 6f 63 52 65 66 |command{|\mDocRef|
|00000780| 7d 5b 31 5d 7b 7b 5c 65 | 6d 20 23 31 7d 7d 0d 0a |}[1]{{\e|m #1}}..|
|00000790| 25 65 6e 64 7b 6c 61 74 | 65 78 6f 6e 6c 79 7d 0d |%end{lat|exonly}.|
|000007a0| 0a 5c 62 65 67 69 6e 7b | 68 74 6d 6c 6f 6e 6c 79 |.\begin{|htmlonly|
|000007b0| 7d 0d 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |}..\newc|ommand{\|
|000007c0| 6d 44 6f 63 52 65 66 7d | 5b 31 5d 7b 5c 68 79 70 |mDocRef}|[1]{\hyp|
|000007d0| 65 72 72 65 66 7b 23 31 | 7d 7b 68 75 6d 7d 7b 68 |erref{#1|}{hum}{h|
|000007e0| 75 6d 7d 7b 23 31 7d 7d | 0d 0a 5c 65 6e 64 7b 68 |um}{#1}}|..\end{h|
|000007f0| 74 6d 6c 6f 6e 6c 79 7d | 0d 0a 0d 0a 25 20 52 65 |tmlonly}|....% Re|
|00000800| 66 65 72 65 6e 63 65 20 | 74 6f 20 61 20 64 6f 63 |ference |to a doc|
|00000810| 75 6d 65 6e 74 20 6c 61 | 62 65 6c 3a 0d 0a 25 62 |ument la|bel:..%b|
|00000820| 65 67 69 6e 7b 6c 61 74 | 65 78 6f 6e 6c 79 7d 0d |egin{lat|exonly}.|
|00000830| 0a 5c 6e 65 77 63 6f 6d | 6d 61 6e 64 7b 5c 6d 44 |.\newcom|mand{\mD|
|00000840| 6f 63 52 65 66 4c 61 62 | 65 6c 7d 5b 32 5d 7b 7b |ocRefLab|el}[2]{{|
|00000850| 5c 65 6d 20 23 31 7d 7d | 0d 0a 25 65 6e 64 7b 6c |\em #1}}|..%end{l|
|00000860| 61 74 65 78 6f 6e 6c 79 | 7d 0d 0a 5c 62 65 67 69 |atexonly|}..\begi|
|00000870| 6e 7b 68 74 6d 6c 6f 6e | 6c 79 7d 0d 0a 5c 6e 65 |n{htmlon|ly}..\ne|
|00000880| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 6d 44 6f 63 52 65 |wcommand|{\mDocRe|
|00000890| 66 4c 61 62 65 6c 7d 5b | 32 5d 7b 5c 68 79 70 65 |fLabel}[|2]{\hype|
|000008a0| 72 72 65 66 7b 23 31 7d | 7b 68 75 6d 7d 7b 68 75 |rref{#1}|{hum}{hu|
|000008b0| 6d 7d 7b 23 32 7d 7d 0d | 0a 5c 65 6e 64 7b 68 74 |m}{#2}}.|.\end{ht|
|000008c0| 6d 6c 6f 6e 6c 79 7d 0d | 0a 0d 0a 0d 0a 5c 61 75 |mlonly}.|.....\au|
|000008d0| 74 68 6f 72 7b 50 65 74 | 74 65 72 69 20 4b 61 6e |thor{Pet|teri Kan|
|000008e0| 67 61 73 6c 61 6d 70 69 | 7d 0d 0a 5c 74 69 74 6c |gaslampi|}..\titl|
|000008f0| 65 7b 4d 49 44 41 53 20 | 53 6f 75 6e 64 20 53 79 |e{MIDAS |Sound Sy|
|00000900| 73 74 65 6d 5c 5c 20 5c | 20 5c 5c 20 50 72 6f 67 |stem\\ \| \\ Prog|
|00000910| 72 61 6d 6d 65 72 27 73 | 20 47 75 69 64 65 7d 0d |rammer's| Guide}.|
|00000920| 0a 0d 0a 0d 0a 5c 62 65 | 67 69 6e 7b 64 6f 63 75 |.....\be|gin{docu|
|00000930| 6d 65 6e 74 7d 0d 0a 0d | 0a 5c 6d 61 6b 65 74 69 |ment}...|.\maketi|
|00000940| 74 6c 65 0d 0a 5c 70 61 | 67 65 6e 75 6d 62 65 72 |tle..\pa|genumber|
|00000950| 69 6e 67 7b 72 6f 6d 61 | 6e 7d 0d 0a 5c 74 61 62 |ing{roma|n}..\tab|
|00000960| 6c 65 6f 66 63 6f 6e 74 | 65 6e 74 73 0d 0a 0d 0a |leofcont|ents....|
|00000970| 5c 6e 65 77 70 61 67 65 | 0d 0a 5c 70 61 67 65 6e |\newpage|..\pagen|
|00000980| 75 6d 62 65 72 69 6e 67 | 7b 61 72 61 62 69 63 7d |umbering|{arabic}|
|00000990| 0d 0a 5c 63 68 61 70 74 | 65 72 7b 49 6e 74 72 6f |..\chapt|er{Intro|
|000009a0| 64 75 63 74 69 6f 6e 7d | 0d 0a 0d 0a 5c 73 65 63 |duction}|....\sec|
|000009b0| 74 69 6f 6e 7b 57 65 6c | 63 6f 6d 65 7d 0d 0a 0d |tion{Wel|come}...|
|000009c0| 0a 57 65 6c 63 6f 6d 65 | 20 74 6f 20 74 68 65 20 |.Welcome| to the |
|000009d0| 65 78 63 69 74 69 6e 67 | 20 77 6f 72 6c 64 20 6f |exciting| world o|
|000009e0| 66 20 64 69 67 69 74 61 | 6c 20 61 75 64 69 6f 21 |f digita|l audio!|
|000009f0| 20 4d 49 44 41 53 20 53 | 6f 75 6e 64 20 53 79 73 | MIDAS S|ound Sys|
|00000a00| 74 65 6d 20 69 73 20 74 | 68 65 0d 0a 6d 6f 73 74 |tem is t|he..most|
|00000a10| 20 63 6f 6d 70 72 65 68 | 65 6e 73 69 76 65 20 63 | compreh|ensive c|
|00000a20| 72 6f 73 73 2d 70 6c 61 | 74 66 6f 72 6d 20 64 69 |ross-pla|tform di|
|00000a30| 67 69 74 61 6c 20 61 75 | 64 69 6f 20 73 79 73 74 |gital au|dio syst|
|00000a40| 65 6d 20 74 6f 64 61 79 | 2e 20 57 69 74 68 20 66 |em today|. With f|
|00000a50| 65 61 74 75 72 65 73 0d | 0a 73 75 63 68 20 61 73 |eatures.|.such as|
|00000a60| 20 61 6e 20 75 6e 6c 69 | 6d 69 74 65 64 20 6e 75 | an unli|mited nu|
|00000a70| 6d 62 65 72 20 6f 66 20 | 64 69 67 69 74 61 6c 20 |mber of |digital |
|00000a80| 63 68 61 6e 6e 65 6c 73 | 20 6f 6e 20 61 6c 6c 20 |channels| on all |
|00000a90| 73 75 70 70 6f 72 74 65 | 64 20 70 6c 61 74 66 6f |supporte|d platfo|
|00000aa0| 72 6d 73 2c 0d 0a 73 69 | 6d 75 6c 74 61 6e 65 6f |rms,..si|multaneo|
|00000ab0| 75 73 20 73 61 6d 70 6c | 65 2c 20 6d 6f 64 75 6c |us sampl|e, modul|
|00000ac0| 65 20 61 6e 64 20 73 74 | 72 65 61 6d 20 70 6c 61 |e and st|ream pla|
|00000ad0| 79 62 61 63 6b 2c 20 61 | 6e 64 20 73 65 61 6d 6c |yback, a|nd seaml|
|00000ae0| 65 73 73 20 70 6f 72 74 | 61 62 69 6c 69 74 79 0d |ess port|ability.|
|00000af0| 0a 61 63 72 6f 73 73 20 | 6f 70 65 72 61 74 69 6e |.across |operatin|
|00000b00| 67 20 73 79 73 74 65 6d | 73 2c 20 4d 49 44 41 53 |g system|s, MIDAS|
|00000b10| 20 69 73 20 61 6c 6c 20 | 79 6f 75 20 6e 65 65 64 | is all |you need|
|00000b20| 20 66 6f 72 20 70 65 72 | 66 65 63 74 20 73 6f 75 | for per|fect sou|
|00000b30| 6e 64 20 69 6e 20 79 6f | 75 72 0d 0a 61 70 70 6c |nd in yo|ur..appl|
|00000b40| 69 63 61 74 69 6f 6e 2e | 0d 0a 0d 0a 54 68 69 73 |ication.|....This|
|00000b50| 20 6d 61 6e 75 61 6c 20 | 69 73 20 74 68 65 20 50 | manual |is the P|
|00000b60| 72 6f 67 72 61 6d 6d 65 | 72 27 73 20 47 75 69 64 |rogramme|r's Guid|
|00000b70| 65 20 74 6f 20 74 68 65 | 20 4d 49 44 41 53 20 53 |e to the| MIDAS S|
|00000b80| 6f 75 6e 64 20 53 79 73 | 74 65 6d 2e 20 49 74 20 |ound Sys|tem. It |
|00000b90| 69 6e 63 6c 75 64 65 73 | 0d 0a 64 65 73 63 72 69 |includes|..descri|
|00000ba0| 70 74 69 6f 6e 73 20 61 | 62 6f 75 74 20 61 6c 6c |ptions a|bout all|
|00000bb0| 20 61 73 70 65 63 74 73 | 20 6f 66 20 4d 49 44 41 | aspects| of MIDA|
|00000bc0| 53 2c 20 69 6e 63 6c 75 | 64 69 6e 67 20 69 6e 69 |S, inclu|ding ini|
|00000bd0| 74 69 61 6c 69 7a 61 74 | 69 6f 6e 2c 0d 0a 63 6f |tializat|ion,..co|
|00000be0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 61 6e 64 20 |nfigurat|ion and |
|00000bf0| 75 73 61 67 65 20 6f 66 | 20 64 69 66 66 65 72 65 |usage of| differe|
|00000c00| 6e 74 20 73 79 73 74 65 | 6d 20 63 6f 6d 70 6f 6e |nt syste|m compon|
|00000c10| 65 6e 74 73 2e 20 49 74 | 20 64 6f 65 73 20 6e 6f |ents. It| does no|
|00000c20| 74 20 61 74 74 65 6d 70 | 74 0d 0a 74 6f 20 64 6f |t attemp|t..to do|
|00000c30| 63 75 6d 65 6e 74 20 61 | 6c 6c 20 66 75 6e 63 74 |cument a|ll funct|
|00000c40| 69 6f 6e 73 20 61 6e 64 | 20 64 61 74 61 20 73 74 |ions and| data st|
|00000c50| 72 75 63 74 75 72 65 73 | 20 61 76 61 69 6c 61 62 |ructures| availab|
|00000c60| 6c 65 20 69 6e 20 4d 49 | 44 41 53 2c 20 62 75 74 |le in MI|DAS, but|
|00000c70| 0d 0a 72 61 74 68 65 72 | 20 67 69 76 65 20 61 20 |..rather| give a |
|00000c80| 67 6f 6f 64 20 6f 76 65 | 72 76 69 65 77 20 6f 6e |good ove|rview on|
|00000c90| 20 68 6f 77 20 79 6f 75 | 20 63 61 6e 20 75 73 65 | how you| can use|
|00000ca0| 20 4d 49 44 41 53 20 69 | 6e 20 79 6f 75 72 20 6f | MIDAS i|n your o|
|00000cb0| 77 6e 0d 0a 70 72 6f 67 | 72 61 6d 73 2e 20 46 6f |wn..prog|rams. Fo|
|00000cc0| 72 20 63 6f 6d 70 6c 65 | 74 65 20 64 65 73 63 72 |r comple|te descr|
|00000cd0| 69 70 74 69 6f 6e 73 20 | 6f 66 20 61 6c 6c 20 66 |iptions |of all f|
|00000ce0| 75 6e 63 74 69 6f 6e 20 | 61 6e 64 20 64 61 74 61 |unction |and data|
|00000cf0| 20 73 74 72 75 63 74 75 | 72 65 73 2c 20 73 65 65 | structu|res, see|
|00000d00| 0d 0a 5c 68 74 6d 6c 61 | 64 64 6e 6f 72 6d 61 6c |..\htmla|ddnormal|
|00000d10| 6c 69 6e 6b 7b 4d 49 44 | 41 53 20 41 50 49 20 52 |link{MID|AS API R|
|00000d20| 65 66 65 72 65 6e 63 65 | 7d 7b 2e 2e 2f 61 70 69 |eference|}{../api|
|00000d30| 72 65 66 2f 61 70 69 72 | 65 66 2e 68 74 6d 6c 7d |ref/apir|ef.html}|
|00000d40| 0d 0a 0d 0a 0d 0a 5c 73 | 65 63 74 69 6f 6e 7b 57 |......\s|ection{W|
|00000d50| 68 61 74 20 69 73 20 4d | 49 44 41 53 3f 7d 0d 0a |hat is M|IDAS?}..|
|00000d60| 0d 0a 57 68 61 74 20 69 | 73 20 4d 49 44 41 53 20 |..What i|s MIDAS |
|00000d70| 53 6f 75 6e 64 20 53 79 | 73 74 65 6d 20 61 6e 79 |Sound Sy|stem any|
|00000d80| 77 61 79 3f 0d 0a 0d 0a | 4d 49 44 41 53 20 69 73 |way?....|MIDAS is|
|00000d90| 20 61 20 6d 75 6c 74 69 | 63 68 61 6e 6e 65 6c 20 | a multi|channel |
|00000da0| 64 69 67 69 74 61 6c 20 | 6d 75 73 69 63 20 61 6e |digital |music an|
|00000db0| 64 20 73 6f 75 6e 64 20 | 65 6e 67 69 6e 65 2e 20 |d sound |engine. |
|00000dc0| 49 74 20 70 72 6f 76 69 | 64 65 73 20 79 6f 75 20 |It provi|des you |
|00000dd0| 77 69 74 68 0d 0a 61 6e | 20 75 6e 6c 69 6d 69 74 |with..an| unlimit|
|00000de0| 65 64 20 6e 75 6d 62 65 | 72 20 6f 66 20 63 68 61 |ed numbe|r of cha|
|00000df0| 6e 6e 65 6c 73 20 6f 66 | 20 64 69 67 69 74 61 6c |nnels of| digital|
|00000e00| 20 61 75 64 69 6f 20 74 | 68 61 74 20 79 6f 75 20 | audio t|hat you |
|00000e10| 63 61 6e 20 75 73 65 20 | 74 6f 20 70 6c 61 79 0d |can use |to play.|
|00000e20| 0a 6d 75 73 69 63 2c 20 | 73 6f 75 6e 64 20 65 66 |.music, |sound ef|
|00000e30| 66 65 63 74 73 2c 20 73 | 70 65 65 63 68 20 6f 72 |fects, s|peech or|
|00000e40| 20 73 6f 75 6e 64 20 73 | 74 72 65 61 6d 73 2e 20 | sound s|treams. |
|00000e50| 4d 49 44 41 53 20 69 73 | 20 70 6f 72 74 61 62 6c |MIDAS is| portabl|
|00000e60| 65 20 61 63 72 6f 73 73 | 20 61 0d 0a 77 69 64 65 |e across| a..wide|
|00000e70| 20 72 61 6e 67 65 20 6f | 66 20 6f 70 65 72 61 74 | range o|f operat|
|00000e80| 69 6e 67 20 73 79 73 74 | 65 6d 73 2c 20 61 6e 64 |ing syst|ems, and|
|00000e90| 20 70 72 6f 76 69 64 65 | 73 20 61 6e 20 69 64 65 | provide|s an ide|
|00000ea0| 6e 74 69 63 61 6c 20 41 | 50 49 20 69 6e 20 61 6c |ntical A|PI in al|
|00000eb0| 6c 0d 0a 73 75 70 70 6f | 72 74 65 64 20 65 6e 76 |l..suppo|rted env|
|00000ec0| 69 72 6f 6e 6d 65 6e 74 | 73 2c 20 6d 61 6b 69 6e |ironment|s, makin|
|00000ed0| 67 20 69 74 20 69 64 65 | 61 6c 20 66 6f 72 20 63 |g it ide|al for c|
|00000ee0| 72 6f 73 73 2d 70 6c 61 | 74 66 6f 72 6d 20 73 6f |ross-pla|tform so|
|00000ef0| 66 74 77 61 72 65 0d 0a | 64 65 76 65 6c 6f 70 6d |ftware..|developm|
|00000f00| 65 6e 74 2e 0d 0a 0d 0a | 4d 49 44 41 53 20 69 73 |ent.....|MIDAS is|
|00000f10| 20 66 72 65 65 20 66 6f | 72 20 6e 6f 6e 63 6f 6d | free fo|r noncom|
|00000f20| 6d 65 72 63 69 61 6c 20 | 75 73 61 67 65 2c 20 72 |mercial |usage, r|
|00000f30| 65 61 64 20 74 68 65 20 | 66 69 6c 65 0d 0a 5c 6d |ead the |file..\m|
|00000f40| 46 69 6c 65 4e 61 6d 65 | 7b 6c 69 63 65 6e 73 65 |FileName|{license|
|00000f50| 2e 74 78 74 7d 20 69 6e | 63 6c 75 64 65 64 20 69 |.txt} in|cluded i|
|00000f60| 6e 20 74 68 65 20 4d 49 | 44 41 53 20 64 69 73 74 |n the MI|DAS dist|
|00000f70| 72 69 62 75 74 69 6f 6e | 20 66 6f 72 20 61 20 64 |ribution| for a d|
|00000f80| 65 74 61 69 6c 65 64 0d | 0a 6c 69 63 65 6e 73 65 |etailed.|.license|
|00000f90| 2e 20 43 6f 6d 6d 65 72 | 63 69 61 6c 20 6c 69 63 |. Commer|cial lic|
|00000fa0| 65 6e 73 65 73 20 61 72 | 65 20 61 6c 73 6f 20 61 |enses ar|e also a|
|00000fb0| 76 61 69 6c 61 62 6c 65 | 2e 0d 0a 0d 0a 0d 0a 0d |vailable|........|
|00000fc0| 0a 5c 63 68 61 70 74 65 | 72 7b 47 65 74 74 69 6e |.\chapte|r{Gettin|
|00000fd0| 67 20 73 74 61 72 74 65 | 64 7d 0d 0a 0d 0a 41 6c |g starte|d}....Al|
|00000fe0| 74 68 6f 75 67 68 20 4d | 49 44 41 53 20 69 73 20 |though M|IDAS is |
|00000ff0| 61 20 76 65 72 79 20 70 | 6f 77 65 72 66 75 6c 20 |a very p|owerful |
|00001000| 73 6f 75 6e 64 20 65 6e | 67 69 6e 65 2c 20 69 74 |sound en|gine, it|
|00001010| 20 69 73 20 61 6c 73 6f | 20 65 78 74 72 65 6d 65 | is also| extreme|
|00001020| 6c 79 0d 0a 65 61 73 79 | 20 74 6f 20 75 73 65 2e |ly..easy| to use.|
|00001030| 20 54 68 69 73 20 63 68 | 61 70 74 65 72 20 63 6f | This ch|apter co|
|00001040| 6e 74 61 69 6e 73 20 61 | 6c 6c 20 74 68 65 20 69 |ntains a|ll the i|
|00001050| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 6e 65 63 65 73 |nformati|on neces|
|00001060| 73 61 72 79 20 74 6f 20 | 64 65 76 65 6c 6f 70 0d |sary to |develop.|
|00001070| 0a 73 69 6d 70 6c 65 20 | 73 6f 75 6e 64 20 61 70 |.simple |sound ap|
|00001080| 70 6c 69 63 61 74 69 6f | 6e 73 20 75 73 69 6e 67 |plicatio|ns using|
|00001090| 20 4d 49 44 41 53 2e 20 | 49 74 20 64 65 73 63 72 | MIDAS. |It descr|
|000010a0| 69 62 65 73 20 68 6f 77 | 20 74 6f 20 6c 69 6e 6b |ibes how| to link|
|000010b0| 20 4d 49 44 41 53 20 69 | 6e 74 6f 0d 0a 79 6f 75 | MIDAS i|nto..you|
|000010c0| 72 20 6f 77 6e 20 70 72 | 6f 67 72 61 6d 73 2c 20 |r own pr|ograms, |
|000010d0| 68 6f 77 20 74 6f 20 75 | 73 65 20 74 68 65 20 4d |how to u|se the M|
|000010e0| 49 44 41 53 20 41 50 49 | 20 66 75 6e 63 74 69 6f |IDAS API| functio|
|000010f0| 6e 73 20 66 72 6f 6d 20 | 79 6f 75 72 20 6f 77 6e |ns from |your own|
|00001100| 20 63 6f 64 65 2c 20 61 | 6e 64 0d 0a 63 6f 6e 63 | code, a|nd..conc|
|00001110| 6c 75 64 65 73 20 77 69 | 74 68 20 61 20 73 69 6d |ludes wi|th a sim|
|00001120| 70 6c 65 20 6d 6f 64 75 | 6c 65 20 70 6c 61 79 65 |ple modu|le playe|
|00001130| 72 20 70 72 6f 67 72 61 | 6d 20 65 78 61 6d 70 6c |r progra|m exampl|
|00001140| 65 2e 0d 0a 0d 0a 0d 0a | 5c 73 65 63 74 69 6f 6e |e.......|\section|
|00001150| 7b 43 6f 6d 70 69 6c 69 | 6e 67 20 77 69 74 68 20 |{Compili|ng with |
|00001160| 4d 49 44 41 53 7d 0d 0a | 0d 0a 46 6f 72 20 61 70 |MIDAS}..|..For ap|
|00001170| 70 6c 69 63 61 74 69 6f | 6e 73 20 75 73 69 6e 67 |plicatio|ns using|
|00001180| 20 6a 75 73 74 20 74 68 | 65 20 4d 49 44 41 53 20 | just th|e MIDAS |
|00001190| 41 50 49 2c 20 6e 6f 20 | 73 70 65 63 69 61 6c 20 |API, no |special |
|000011a0| 63 6f 6d 70 69 6c 61 74 | 69 6f 6e 20 6f 70 74 69 |compilat|ion opti|
|000011b0| 6f 6e 73 20 61 72 65 0d | 0a 6e 65 63 65 73 73 61 |ons are.|.necessa|
|000011c0| 72 79 2e 20 41 6c 6c 20 | 4d 49 44 41 53 20 41 50 |ry. All |MIDAS AP|
|000011d0| 49 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 61 72 |I defini|tions ar|
|000011e0| 65 20 69 6e 20 74 68 65 | 20 66 69 6c 65 20 5c 6d |e in the| file \m|
|000011f0| 46 69 6c 65 4e 61 6d 65 | 7b 6d 69 64 61 73 64 6c |FileName|{midasdl|
|00001200| 6c 2e 68 7d 0d 0a 5b 46 | 49 58 4d 45 5d 2c 20 61 |l.h}..[F|IXME], a|
|00001210| 6e 64 20 74 68 65 20 6d | 6f 64 75 6c 65 73 20 75 |nd the m|odules u|
|00001220| 73 69 6e 67 20 4d 49 44 | 41 53 20 66 75 6e 63 74 |sing MID|AS funct|
|00001230| 69 6f 6e 73 20 73 69 6d | 70 6c 79 20 6e 65 65 64 |ions sim|ply need|
|00001240| 20 74 6f 0d 0a 5c 6d 52 | 65 73 57 6f 72 64 7b 5c | to..\mR|esWord{\|
|00001250| 23 7b 7d 69 6e 63 6c 75 | 64 65 7d 20 74 68 69 73 |#{}inclu|de} this|
|00001260| 20 66 69 6c 65 2e 20 4e | 6f 20 73 70 65 63 69 61 | file. N|o specia|
|00001270| 6c 20 6d 61 63 72 6f 73 | 20 6e 65 65 64 20 74 6f |l macros| need to|
|00001280| 20 62 65 0d 0a 5c 6d 52 | 65 73 57 6f 72 64 7b 5c | be..\mR|esWord{\|
|00001290| 23 7b 7d 64 65 66 69 6e | 65 7d 64 2c 20 61 6e 64 |#{}defin|e}d, and|
|000012a0| 20 74 68 65 20 64 61 74 | 61 20 73 74 72 75 63 74 | the dat|a struct|
|000012b0| 75 72 65 73 20 61 72 65 | 20 73 74 72 75 63 74 75 |ures are| structu|
|000012c0| 72 65 2d 70 61 63 6b 69 | 6e 67 20 6e 65 75 74 72 |re-packi|ng neutr|
|000012d0| 61 6c 2e 0d 0a 5c 6d 46 | 69 6c 65 4e 61 6d 65 7b |al...\mF|ileName{|
|000012e0| 6d 69 64 61 73 64 6c 6c | 2e 68 7d 20 69 73 20 6c |midasdll|.h} is l|
|000012f0| 6f 63 61 74 65 64 20 69 | 6e 20 74 68 65 20 5c 6d |ocated i|n the \m|
|00001300| 46 69 6c 65 4e 61 6d 65 | 7b 69 6e 63 6c 75 64 65 |FileName|{include|
|00001310| 2f 7d 20 73 75 62 64 69 | 72 65 63 74 6f 72 79 20 |/} subdi|rectory |
|00001320| 6f 66 0d 0a 74 68 65 20 | 4d 49 44 41 53 20 64 69 |of..the |MIDAS di|
|00001330| 73 74 72 69 62 75 74 69 | 6f 6e 2c 20 61 6e 64 20 |stributi|on, and |
|00001340| 79 6f 75 20 6d 61 79 20 | 6e 65 65 64 20 74 6f 20 |you may |need to |
|00001350| 61 64 64 20 74 68 61 74 | 20 64 69 72 65 63 74 6f |add that| directo|
|00001360| 72 79 20 74 6f 20 79 6f | 75 72 0d 0a 69 6e 63 6c |ry to yo|ur..incl|
|00001370| 75 64 65 20 66 69 6c 65 | 20 73 65 61 72 63 68 20 |ude file| search |
|00001380| 70 61 74 68 2e 0d 0a 0d | 0a 55 6e 64 65 72 20 57 |path....|.Under W|
|00001390| 69 6e 64 6f 77 73 20 4e | 54 2f 39 35 2c 20 74 68 |indows N|T/95, th|
|000013a0| 65 20 4d 49 44 41 53 20 | 41 50 49 20 66 75 6e 63 |e MIDAS |API func|
|000013b0| 74 69 6f 6e 73 20 75 73 | 65 20 74 68 65 20 5c 6d |tions us|e the \m|
|000013c0| 52 65 73 57 6f 72 64 7b | 73 74 64 63 61 6c 6c 7d |ResWord{|stdcall}|
|000013d0| 0d 0a 63 61 6c 6c 69 6e | 67 20 63 6f 6e 76 65 6e |..callin|g conven|
|000013e0| 74 69 6f 6e 2c 20 74 68 | 65 20 73 61 6d 65 20 61 |tion, th|e same a|
|000013f0| 73 20 75 73 65 64 20 62 | 79 20 74 68 65 20 57 69 |s used b|y the Wi|
|00001400| 6e 33 32 20 41 50 49 2e | 20 55 6e 64 65 72 20 44 |n32 API.| Under D|
|00001410| 4f 53 2c 20 74 68 65 0d | 0a 66 75 6e 63 74 69 6f |OS, the.|.functio|
|00001420| 6e 73 20 75 73 65 20 74 | 68 65 20 5c 6d 52 65 73 |ns use t|he \mRes|
|00001430| 57 6f 72 64 7b 63 64 65 | 63 6c 7d 20 63 61 6c 6c |Word{cde|cl} call|
|00001440| 69 6e 67 20 63 6f 6e 76 | 65 6e 74 69 6f 6e 2c 20 |ing conv|ention, |
|00001450| 61 6e 64 20 75 6e 64 65 | 72 20 4c 69 6e 75 78 20 |and unde|r Linux |
|00001460| 74 68 65 0d 0a 64 65 66 | 61 75 6c 74 20 63 61 6c |the..def|ault cal|
|00001470| 6c 69 6e 67 20 63 6f 6e | 76 65 6e 74 69 6f 6e 20 |ling con|vention |
|00001480| 75 73 65 64 20 62 79 20 | 47 43 43 2e 20 54 68 69 |used by |GCC. Thi|
|00001490| 73 20 69 73 20 64 6f 6e | 65 20 74 72 61 6e 73 70 |s is don|e transp|
|000014a0| 61 72 65 6e 74 6c 79 20 | 74 6f 20 74 68 65 0d 0a |arently |to the..|
|000014b0| 75 73 65 72 2c 20 68 6f | 77 65 76 65 72 2e 0d 0a |user, ho|wever...|
|000014c0| 0d 0a 44 65 6c 70 68 69 | 20 75 73 65 72 73 20 63 |..Delphi| users c|
|000014d0| 61 6e 20 73 69 6d 70 6c | 79 20 75 73 65 20 74 68 |an simpl|y use th|
|000014e0| 65 20 69 6e 74 65 72 66 | 61 63 65 20 75 6e 69 74 |e interf|ace unit|
|000014f0| 20 5c 6d 46 69 6c 65 4e | 61 6d 65 7b 6d 69 64 61 | \mFileN|ame{mida|
|00001500| 73 64 6c 6c 2e 70 61 73 | 7d 2c 20 61 6e 64 0d 0a |sdll.pas|}, and..|
|00001510| 61 63 63 65 73 73 20 74 | 68 65 20 4d 49 44 41 53 |access t|he MIDAS|
|00001520| 20 41 50 49 20 66 75 6e | 63 74 69 6f 6e 73 20 74 | API fun|ctions t|
|00001530| 68 72 6f 75 67 68 20 69 | 74 2e 20 41 6c 74 68 6f |hrough i|t. Altho|
|00001540| 75 67 68 20 44 65 6c 70 | 68 69 20 73 79 6e 74 61 |ugh Delp|hi synta|
|00001550| 78 20 69 73 0d 0a 64 69 | 66 66 65 72 65 6e 74 20 |x is..di|fferent |
|00001560| 66 72 6f 6d 20 43 2c 20 | 74 68 65 20 66 75 6e 63 |from C, |the func|
|00001570| 74 69 6f 6e 2c 20 73 74 | 72 75 63 74 75 72 65 20 |tion, st|ructure |
|00001580| 61 6e 64 20 63 6f 6e 73 | 74 61 6e 74 20 6e 61 6d |and cons|tant nam|
|00001590| 65 73 20 61 72 65 20 65 | 78 61 63 74 6c 79 20 74 |es are e|xactly t|
|000015a0| 68 65 0d 0a 73 61 6d 65 | 2c 20 61 6e 64 20 61 6c |he..same|, and al|
|000015b0| 6c 20 70 61 72 61 6d 65 | 74 65 72 73 20 61 72 65 |l parame|ters are|
|000015c0| 20 70 61 73 73 65 64 20 | 6a 75 73 74 20 6c 69 6b | passed |just lik|
|000015d0| 65 20 69 6e 20 74 68 65 | 20 43 20 76 65 72 73 69 |e in the| C versi|
|000015e0| 6f 6e 73 2e 20 54 68 65 | 72 65 66 6f 72 65 0d 0a |ons. The|refore..|
|000015f0| 61 6c 6c 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |all info|rmation |
|00001600| 69 6e 20 74 68 69 73 20 | 64 6f 63 75 6d 65 6e 74 |in this |document|
|00001610| 20 61 6e 64 20 74 68 65 | 20 41 50 49 20 52 65 66 | and the| API Ref|
|00001620| 65 72 65 6e 63 65 20 69 | 73 20 61 6c 73 6f 20 76 |erence i|s also v|
|00001630| 61 6c 69 64 20 66 6f 72 | 0d 0a 44 65 6c 70 68 69 |alid for|..Delphi|
|00001640| 2e 0d 0a 0d 0a 0d 0a 0d | 0a 5c 73 65 63 74 69 6f |........|.\sectio|
|00001650| 6e 7b 4c 69 6e 6b 69 6e | 67 20 77 69 74 68 20 4d |n{Linkin|g with M|
|00001660| 49 44 41 53 7d 0d 0a 0d | 0a 49 66 20 79 6f 75 72 |IDAS}...|.If your|
|00001670| 20 70 72 6f 67 72 61 6d | 20 75 73 65 73 20 4d 49 | program| uses MI|
|00001680| 44 41 53 20 53 6f 75 6e | 64 20 53 79 73 74 65 6d |DAS Soun|d System|
|00001690| 2c 20 79 6f 75 20 6e 61 | 74 75 72 61 6c 6c 79 20 |, you na|turally |
|000016a0| 6e 65 65 64 20 74 6f 20 | 6c 69 6e 6b 20 77 69 74 |need to |link wit|
|000016b0| 68 20 74 68 65 0d 0a 4d | 49 44 41 53 20 6c 69 62 |h the..M|IDAS lib|
|000016c0| 72 61 72 69 65 73 20 61 | 73 20 77 65 6c 6c 2e 20 |raries a|s well. |
|000016d0| 54 68 69 73 20 73 65 63 | 74 69 6f 6e 20 64 65 73 |This sec|tion des|
|000016e0| 63 72 69 62 65 73 20 68 | 6f 77 20 74 6f 20 64 6f |cribes h|ow to do|
|000016f0| 20 74 68 61 74 20 6f 6e | 20 65 61 63 68 0d 0a 70 | that on| each..p|
|00001700| 6c 61 74 66 6f 72 6d 20 | 73 75 70 70 6f 72 74 65 |latform |supporte|
|00001710| 64 2e 0d 0a 0d 0a 0d 0a | 5c 73 75 62 73 65 63 74 |d.......|\subsect|
|00001720| 69 6f 6e 7b 57 69 6e 64 | 6f 77 73 20 4e 54 2f 39 |ion{Wind|ows NT/9|
|00001730| 35 7d 0d 0a 0d 0a 55 6e | 64 65 72 20 74 68 65 20 |5}....Un|der the |
|00001740| 57 69 6e 33 32 20 70 6c | 61 74 66 6f 72 6d 2c 20 |Win32 pl|atform, |
|00001750| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 63 61 6e |applicat|ions can|
|00001760| 20 6c 69 6e 6b 20 77 69 | 74 68 20 4d 49 44 41 53 | link wi|th MIDAS|
|00001770| 20 65 69 74 68 65 72 20 | 73 74 61 74 69 63 61 6c | either |statical|
|00001780| 6c 79 0d 0a 6f 72 20 64 | 79 6e 61 6d 69 63 61 6c |ly..or d|ynamical|
|00001790| 6c 79 2e 20 55 6e 6c 65 | 73 73 20 74 68 65 72 65 |ly. Unle|ss there|
|000017a0| 20 69 73 20 61 20 73 70 | 65 63 69 66 69 63 20 6e | is a sp|ecific n|
|000017b0| 65 65 64 20 74 6f 20 6c | 69 6e 6b 20 77 69 74 68 |eed to l|ink with|
|000017c0| 20 4d 49 44 41 53 0d 0a | 73 74 61 74 69 63 61 6c | MIDAS..|statical|
|000017d0| 6c 79 2c 20 64 79 6e 61 | 6d 69 63 20 6c 69 6e 6b |ly, dyna|mic link|
|000017e0| 69 6e 67 20 69 73 20 72 | 65 63 6f 6d 6d 65 6e 64 |ing is r|ecommend|
|000017f0| 65 64 2e 20 44 65 6c 70 | 68 69 20 75 73 65 72 73 |ed. Delp|hi users|
|00001800| 20 6e 65 65 64 20 74 6f | 20 75 73 65 20 64 79 6e | need to| use dyn|
|00001810| 61 6d 69 63 0d 0a 6c 69 | 6e 6b 69 6e 67 20 61 6c |amic..li|nking al|
|00001820| 77 61 79 73 2e 0d 0a 0d | 0a 57 68 65 6e 20 6c 69 |ways....|.When li|
|00001830| 6e 6b 69 6e 67 20 77 69 | 74 68 20 4d 49 44 41 53 |nking wi|th MIDAS|
|00001840| 20 73 74 61 74 69 63 61 | 6c 6c 79 2c 20 73 69 6d | statica|lly, sim|
|00001850| 70 6c 79 20 6c 69 6e 6b | 20 69 6e 20 74 68 65 20 |ply link| in the |
|00001860| 6c 69 62 72 61 72 79 20 | 66 69 6c 65 0d 0a 63 6f |library |file..co|
|00001870| 72 72 65 73 70 6f 6e 64 | 69 6e 67 20 74 6f 20 79 |rrespond|ing to y|
|00001880| 6f 75 72 20 64 65 76 65 | 6c 6f 70 6d 65 6e 74 20 |our deve|lopment |
|00001890| 70 6c 61 74 66 6f 72 6d | 2e 20 41 6c 6c 20 4d 49 |platform|. All MI|
|000018a0| 44 41 53 20 6c 69 62 72 | 61 72 69 65 73 20 61 72 |DAS libr|aries ar|
|000018b0| 65 20 6c 6f 63 61 74 65 | 64 0d 0a 69 6e 20 74 68 |e locate|d..in th|
|000018c0| 65 20 5c 6d 46 69 6c 65 | 4e 61 6d 65 7b 6c 69 62 |e \mFile|Name{lib|
|000018d0| 2f 7d 20 73 75 62 64 69 | 72 65 63 74 6f 72 79 20 |/} subdi|rectory |
|000018e0| 6f 66 20 74 68 65 20 64 | 69 73 74 72 69 62 75 74 |of the d|istribut|
|000018f0| 69 6f 6e 2e 20 57 61 74 | 63 6f 6d 20 43 2f 43 2b |ion. Wat|com C/C+|
|00001900| 2b 20 75 73 65 72 73 0d | 0a 6e 65 65 64 20 74 6f |+ users.|.need to|
|00001910| 20 6c 69 6e 6b 20 77 69 | 74 68 20 74 68 65 20 66 | link wi|th the f|
|00001920| 69 6c 65 20 5c 6d 46 69 | 6c 65 4e 61 6d 65 7b 6d |ile \mFi|leName{m|
|00001930| 69 64 61 73 6e 74 5c 5f | 7b 7d 77 61 74 63 6f 6d |idasnt\_|{}watcom|
|00001940| 2e 6c 69 62 7d 2c 20 61 | 6e 64 20 56 69 73 75 61 |.lib}, a|nd Visua|
|00001950| 6c 0d 0a 43 2f 43 2b 2b | 20 75 73 65 72 73 20 77 |l..C/C++| users w|
|00001960| 69 74 68 20 5c 6d 46 69 | 6c 65 4e 61 6d 65 7b 6d |ith \mFi|leName{m|
|00001970| 69 64 61 73 6e 74 5c 5f | 7b 7d 76 69 73 75 61 6c |idasnt\_|{}visual|
|00001980| 63 2e 6c 69 62 7d 2e 20 | 44 65 70 65 6e 64 69 6e |c.lib}. |Dependin|
|00001990| 67 20 6f 6e 20 79 6f 75 | 72 0d 0a 63 6f 6e 66 69 |g on you|r..confi|
|000019a0| 67 75 72 61 74 69 6f 6e | 2c 20 79 6f 75 20 6d 61 |guration|, you ma|
|000019b0| 79 20 6e 65 65 64 20 74 | 6f 20 61 64 64 20 74 68 |y need t|o add th|
|000019c0| 65 20 5c 6d 46 69 6c 65 | 4e 61 6d 65 7b 6c 69 62 |e \mFile|Name{lib|
|000019d0| 2f 7d 20 73 75 62 64 69 | 72 65 63 74 6f 72 79 20 |/} subdi|rectory |
|000019e0| 69 6e 74 6f 0d 0a 79 6f | 75 72 20 60 60 6c 69 62 |into..yo|ur ``lib|
|000019f0| 72 61 72 79 20 70 61 74 | 68 73 27 27 20 6c 69 73 |rary pat|hs'' lis|
|00001a00| 74 2e 20 57 68 65 6e 20 | 4d 49 44 41 53 20 69 73 |t. When |MIDAS is|
|00001a10| 20 6c 69 6e 6b 65 64 20 | 69 6e 74 6f 20 74 68 65 | linked |into the|
|00001a20| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 0d 0a 73 74 | applica|tion..st|
|00001a30| 61 74 69 63 61 6c 6c 79 | 2c 20 74 68 65 20 2e 65 |atically|, the .e|
|00001a40| 78 65 20 69 73 20 73 65 | 6c 66 2d 63 6f 6e 74 61 |xe is se|lf-conta|
|00001a50| 69 6e 65 64 20 61 6e 64 | 20 6e 6f 20 4d 49 44 41 |ined and| no MIDA|
|00001a60| 53 20 5c 6d 46 69 6c 65 | 4e 61 6d 65 7b 2e 64 6c |S \mFile|Name{.dl|
|00001a70| 6c 7d 20 66 69 6c 65 73 | 0d 0a 61 72 65 20 6e 65 |l} files|..are ne|
|00001a80| 65 64 65 64 2e 0d 0a 0d | 0a 44 79 6e 61 6d 69 63 |eded....|.Dynamic|
|00001a90| 20 6c 69 6e 6b 69 6e 67 | 20 69 73 20 64 6f 6e 65 | linking| is done|
|00001aa0| 20 62 79 20 6c 69 6e 6b | 69 6e 67 20 77 69 74 68 | by link|ing with|
|00001ab0| 20 74 68 65 20 61 70 70 | 72 6f 70 72 69 61 74 65 | the app|ropriate|
|00001ac0| 20 4d 49 44 41 53 20 69 | 6d 70 6f 72 74 20 6c 69 | MIDAS i|mport li|
|00001ad0| 62 72 61 72 79 0d 0a 69 | 6e 73 74 65 61 64 20 6f |brary..i|nstead o|
|00001ae0| 66 20 74 68 65 20 73 74 | 61 74 69 63 20 6c 69 6e |f the st|atic lin|
|00001af0| 6b 69 6e 67 20 6c 69 62 | 72 61 72 79 2e 20 49 6e |king lib|rary. In|
|00001b00| 20 61 64 64 69 74 69 6f | 6e 2c 20 74 68 65 20 4d | additio|n, the M|
|00001b10| 49 44 41 53 20 44 79 6e | 61 6d 69 63 20 4c 69 6e |IDAS Dyn|amic Lin|
|00001b20| 6b 0d 0a 4c 69 62 72 61 | 72 79 20 28 5c 6d 46 69 |k..Libra|ry (\mFi|
|00001b30| 6c 65 4e 61 6d 65 7b 6d | 69 64 61 73 58 58 2e 64 |leName{m|idasXX.d|
|00001b40| 6c 6c 7d 29 20 6e 65 65 | 64 73 20 74 6f 20 62 65 |ll}) nee|ds to be|
|00001b50| 20 70 6c 61 63 65 64 20 | 69 6e 20 61 20 73 75 69 | placed |in a sui|
|00001b60| 74 61 62 6c 65 20 64 69 | 72 65 63 74 6f 72 79 0d |table di|rectory.|
|00001b70| 0a 2d 2d 2d 20 65 69 74 | 68 65 72 20 74 6f 20 74 |.--- eit|her to t|
|00001b80| 68 65 20 73 61 6d 65 20 | 64 69 72 65 63 74 6f 72 |he same |director|
|00001b90| 79 20 77 69 74 68 20 74 | 68 65 20 70 72 6f 67 72 |y with t|he progr|
|00001ba0| 61 6d 20 65 78 65 63 75 | 74 61 62 6c 65 2c 20 6f |am execu|table, o|
|00001bb0| 72 20 69 6e 20 73 6f 6d | 65 0d 0a 64 69 72 65 63 |r in som|e..direc|
|00001bc0| 74 6f 72 79 20 69 6e 20 | 74 68 65 20 75 73 65 72 |tory in |the user|
|00001bd0| 27 73 20 50 41 54 48 2e | 20 54 68 65 20 69 6d 70 |'s PATH.| The imp|
|00001be0| 6f 72 74 20 6c 69 62 72 | 61 72 79 20 6e 61 6d 65 |ort libr|ary name|
|00001bf0| 73 20 63 6f 72 72 65 73 | 70 6f 6e 64 20 74 6f 20 |s corres|pond to |
|00001c00| 74 68 65 0d 0a 5c 6d 46 | 69 6c 65 4e 61 6d 65 7b |the..\mF|ileName{|
|00001c10| 2e 64 6c 6c 7d 20 6e 61 | 6d 65 3a 20 5c 6d 46 69 |.dll} na|me: \mFi|
|00001c20| 6c 65 4e 61 6d 65 7b 6d | 69 64 61 73 58 58 5c 5f |leName{m|idasXX\_|
|00001c30| 7b 7d 76 69 73 75 61 6c | 63 2e 6c 69 62 7d 20 66 |{}visual|c.lib} f|
|00001c40| 6f 72 20 56 69 73 75 61 | 6c 20 43 2f 43 2b 2b 20 |or Visua|l C/C++ |
|00001c50| 61 6e 64 0d 0a 5c 6d 46 | 69 6c 65 4e 61 6d 65 7b |and..\mF|ileName{|
|00001c60| 6d 69 64 61 73 58 58 5c | 5f 7b 7d 77 61 74 63 6f |midasXX\|_{}watco|
|00001c70| 6d 2e 6c 69 62 7d 20 66 | 6f 72 20 57 61 74 63 6f |m.lib} f|or Watco|
|00001c80| 6d 20 43 2f 43 2b 2b 2e | 20 28 74 68 65 20 58 58 |m C/C++.| (the XX|
|00001c90| 20 73 74 61 6e 64 73 20 | 66 6f 72 20 74 68 65 0d | stands |for the.|
|00001ca0| 0a 4d 49 44 41 53 20 76 | 65 72 73 69 6f 6e 20 6e |.MIDAS v|ersion n|
|00001cb0| 75 6d 62 65 72 29 2e 0d | 0a 0d 0a 44 65 6c 70 68 |umber)..|...Delph|
|00001cc0| 69 20 75 73 65 72 73 20 | 64 6f 20 6e 6f 74 20 6e |i users |do not n|
|00001cd0| 65 65 64 20 61 20 73 65 | 70 61 72 61 74 65 20 69 |eed a se|parate i|
|00001ce0| 6d 70 6f 72 74 20 6c 69 | 62 72 61 72 79 20 2d 2d |mport li|brary --|
|00001cf0| 2d 20 75 73 69 6e 67 20 | 74 68 65 20 69 6e 74 65 |- using |the inte|
|00001d00| 72 66 61 63 65 0d 0a 75 | 6e 69 74 20 5c 6d 46 69 |rface..u|nit \mFi|
|00001d10| 6c 65 4e 61 6d 65 7b 6d | 69 64 61 73 64 6c 6c 2e |leName{m|idasdll.|
|00001d20| 70 61 73 7d 20 61 64 64 | 73 20 74 68 65 20 6e 65 |pas} add|s the ne|
|00001d30| 63 65 73 73 61 72 79 20 | 72 65 66 65 72 65 6e 63 |cessary |referenc|
|00001d40| 65 73 20 74 6f 20 74 68 | 65 0d 0a 5c 6d 46 69 6c |es to th|e..\mFil|
|00001d50| 65 4e 61 6d 65 7b 2e 64 | 6c 6c 7d 20 61 75 74 6f |eName{.d|ll} auto|
|00001d60| 6d 61 74 69 63 61 6c 6c | 79 2e 20 4e 6f 74 65 20 |maticall|y. Note |
|00001d70| 74 68 61 74 20 72 75 6e | 6e 69 6e 67 20 74 68 65 |that run|ning the|
|00001d80| 20 70 72 6f 67 72 61 6d | 20 75 6e 64 65 72 20 74 | program| under t|
|00001d90| 68 65 0d 0a 44 65 6c 70 | 68 69 20 49 44 45 20 77 |he..Delp|hi IDE w|
|00001da0| 69 74 68 6f 75 74 20 74 | 68 65 20 5c 6d 46 69 6c |ithout t|he \mFil|
|00001db0| 65 4e 61 6d 65 7b 2e 64 | 6c 6c 7d 20 61 76 61 69 |eName{.d|ll} avai|
|00001dc0| 6c 61 62 6c 65 20 63 61 | 6e 20 63 61 75 73 65 20 |lable ca|n cause |
|00001dd0| 73 74 72 61 6e 67 65 20 | 65 72 72 6f 72 0d 0a 6d |strange |error..m|
|00001de0| 65 73 73 61 67 65 73 2e | 0d 0a 0d 0a 0d 0a 0d 0a |essages.|........|
|00001df0| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 4d 53 2d 44 |\subsect|ion{MS-D|
|00001e00| 4f 53 7d 0d 0a 0d 0a 41 | 73 20 4d 53 2d 44 4f 53 |OS}....A|s MS-DOS|
|00001e10| 20 64 6f 65 73 6e 27 74 | 20 73 75 70 70 6f 72 74 | doesn't| support|
|00001e20| 20 64 79 6e 61 6d 69 63 | 20 6c 69 6e 6b 69 6e 67 | dynamic| linking|
|00001e30| 2c 20 6f 6e 6c 79 20 61 | 20 73 74 61 74 69 63 20 |, only a| static |
|00001e40| 6c 69 6e 6b 20 6c 69 62 | 72 61 72 79 20 69 73 0d |link lib|rary is.|
|00001e50| 0a 70 72 6f 76 69 64 65 | 64 20 66 6f 72 20 4d 53 |.provide|d for MS|
|00001e60| 2d 44 4f 53 2e 20 59 6f | 75 27 6c 6c 20 73 69 6d |-DOS. Yo|u'll sim|
|00001e70| 70 6c 79 20 6e 65 65 64 | 20 74 6f 20 6c 69 6e 6b |ply need| to link|
|00001e80| 20 66 69 6c 65 20 5c 6d | 46 69 6c 65 4e 61 6d 65 | file \m|FileName|
|00001e90| 7b 6d 69 64 61 73 64 6f | 73 2e 6c 69 62 7d 0d 0a |{midasdo|s.lib}..|
|00001ea0| 66 72 6f 6d 20 74 68 65 | 20 5c 6d 46 69 6c 65 4e |from the| \mFileN|
|00001eb0| 61 6d 65 7b 6c 69 62 2f | 7d 20 73 75 62 64 69 72 |ame{lib/|} subdir|
|00001ec0| 65 63 74 6f 72 79 20 6f | 66 20 74 68 65 20 4d 49 |ectory o|f the MI|
|00001ed0| 44 41 53 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e |DAS dist|ribution|
|00001ee0| 2c 20 61 6e 64 20 79 6f | 75 72 0d 0a 70 72 6f 67 |, and yo|ur..prog|
|00001ef0| 72 61 6d 20 69 73 20 72 | 65 61 64 79 20 74 6f 20 |ram is r|eady to |
|00001f00| 75 73 65 20 4d 49 44 41 | 53 20 53 6f 75 6e 64 20 |use MIDA|S Sound |
|00001f10| 53 79 73 74 65 6d 2e 20 | 54 68 65 20 65 78 65 63 |System. |The exec|
|00001f20| 75 74 61 62 6c 65 20 69 | 73 20 66 75 6c 6c 79 0d |utable i|s fully.|
|00001f30| 0a 73 65 6c 66 2d 63 6f | 6e 74 61 69 6e 65 64 2c |.self-co|ntained,|
|00001f40| 20 61 6e 64 20 6e 6f 20 | 61 64 64 69 74 69 6f 6e | and no |addition|
|00001f50| 61 6c 20 66 69 6c 65 73 | 20 61 72 65 20 6e 65 65 |al files| are nee|
|00001f60| 64 65 64 2e 0d 0a 0d 0a | 4e 6f 74 65 20 74 68 61 |ded.....|Note tha|
|00001f70| 74 20 73 6f 6d 65 20 76 | 65 72 73 69 6f 6e 73 20 |t some v|ersions |
|00001f80| 6f 66 20 74 68 65 20 57 | 61 74 63 6f 6d 20 4c 69 |of the W|atcom Li|
|00001f90| 6e 6b 65 72 20 61 72 65 | 20 6e 6f 74 20 63 61 73 |nker are| not cas|
|00001fa0| 65 2d 73 65 6e 73 69 74 | 69 76 65 20 62 79 0d 0a |e-sensit|ive by..|
|00001fb0| 64 65 66 61 75 6c 74 2c | 20 61 6e 64 20 79 6f 75 |default,| and you|
|00001fc0| 27 6c 6c 20 6e 65 65 64 | 20 74 6f 20 75 73 65 20 |'ll need| to use |
|00001fd0| 63 61 73 65 2d 73 65 6e | 73 69 74 69 76 65 20 6c |case-sen|sitive l|
|00001fe0| 69 6e 6b 69 6e 67 20 77 | 69 74 68 20 4d 49 44 41 |inking w|ith MIDA|
|00001ff0| 53 2e 20 54 6f 20 64 6f | 0d 0a 74 68 61 74 2c 20 |S. To do|..that, |
|00002000| 73 69 6d 70 6c 79 20 61 | 64 64 20 5c 6d 52 65 73 |simply a|dd \mRes|
|00002010| 57 6f 72 64 7b 6f 70 74 | 69 6f 6e 20 63 61 73 65 |Word{opt|ion case|
|00002020| 65 78 61 63 74 7d 20 74 | 6f 20 79 6f 75 72 20 6c |exact} t|o your l|
|00002030| 69 6e 6b 65 72 20 64 69 | 72 65 63 74 69 76 65 73 |inker di|rectives|
|00002040| 2e 0d 0a 0d 0a 0d 0a 0d | 0a 5c 73 75 62 73 65 63 |........|.\subsec|
|00002050| 74 69 6f 6e 7b 4c 69 6e | 75 78 7d 0d 0a 0d 0a 46 |tion{Lin|ux}....F|
|00002060| 6f 72 20 4c 69 6e 75 78 | 2c 20 62 6f 74 68 20 64 |or Linux|, both d|
|00002070| 79 6e 61 6d 69 63 20 61 | 6e 64 20 73 74 61 74 69 |ynamic a|nd stati|
|00002080| 63 20 6c 69 62 72 61 72 | 69 65 73 20 61 72 65 20 |c librar|ies are |
|00002090| 70 72 6f 76 69 64 65 64 | 2e 20 54 6f 20 6c 69 6e |provided|. To lin|
|000020a0| 6b 20 79 6f 75 72 0d 0a | 70 72 6f 67 72 61 6d 20 |k your..|program |
|000020b0| 77 69 74 68 20 4d 49 44 | 41 53 2c 20 61 64 64 20 |with MID|AS, add |
|000020c0| 74 68 65 20 4d 49 44 41 | 53 20 6c 69 62 72 61 72 |the MIDA|S librar|
|000020d0| 79 20 64 69 72 65 63 74 | 6f 72 79 20 74 6f 20 79 |y direct|ory to y|
|000020e0| 6f 75 72 20 6c 69 62 72 | 61 72 79 20 64 69 72 65 |our libr|ary dire|
|000020f0| 63 74 6f 72 79 0d 0a 6c | 69 73 74 20 28 67 63 63 |ctory..l|ist (gcc|
|00002100| 20 6f 70 74 69 6f 6e 20 | 5c 6d 52 65 73 57 6f 72 | option |\mResWor|
|00002110| 64 7b 2d 4c 7d 29 2c 20 | 61 6e 64 20 6c 69 6e 6b |d{-L}), |and link|
|00002120| 20 74 68 65 20 6c 69 62 | 72 61 72 79 20 69 6e 20 | the lib|rary in |
|00002130| 75 73 69 6e 67 20 74 68 | 65 20 47 43 43 20 6f 70 |using th|e GCC op|
|00002140| 74 69 6f 6e 0d 0a 5c 6d | 52 65 73 57 6f 72 64 7b |tion..\m|ResWord{|
|00002150| 2d 6c 6d 69 64 61 73 7d | 2e 20 44 65 70 65 6e 64 |-lmidas}|. Depend|
|00002160| 69 6e 67 20 6f 6e 20 77 | 68 65 74 68 65 72 20 79 |ing on w|hether y|
|00002170| 6f 75 20 61 72 65 20 62 | 75 69 6c 64 69 6e 67 20 |ou are b|uilding |
|00002180| 61 20 73 74 61 74 69 63 | 61 6c 6c 79 20 6f 72 0d |a static|ally or.|
|00002190| 0a 64 79 6e 61 6d 69 63 | 61 6c 6c 79 20 6c 69 6e |.dynamic|ally lin|
|000021a0| 6b 65 64 20 70 72 6f 67 | 72 61 6d 2c 20 47 43 43 |ked prog|ram, GCC|
|000021b0| 20 77 69 6c 6c 20 61 75 | 74 6f 6d 61 74 69 63 61 | will au|tomatica|
|000021c0| 6c 6c 79 20 73 65 6c 65 | 63 74 20 74 68 65 20 63 |lly sele|ct the c|
|000021d0| 6f 72 72 65 63 74 0d 0a | 6c 69 62 72 61 72 79 2e |orrect..|library.|
|000021e0| 0d 0a 0d 0a 0d 0a 0d 0a | 5c 73 65 63 74 69 6f 6e |........|\section|
|000021f0| 7b 41 6e 20 65 78 61 6d | 70 6c 65 20 70 72 6f 67 |{An exam|ple prog|
|00002200| 72 61 6d 7d 0d 0a 0d 0a | 54 68 69 73 20 73 65 63 |ram}....|This sec|
|00002210| 74 69 6f 6e 20 64 65 73 | 63 72 69 62 65 73 20 61 |tion des|cribes a|
|00002220| 20 76 65 72 79 20 73 69 | 6d 70 6c 65 20 65 78 61 | very si|mple exa|
|00002230| 6d 70 6c 65 20 70 72 6f | 67 72 61 6d 20 74 68 61 |mple pro|gram tha|
|00002240| 74 20 75 73 65 73 20 4d | 49 44 41 53 20 66 6f 72 |t uses M|IDAS for|
|00002250| 0d 0a 70 6c 61 79 69 6e | 67 20 6d 75 73 69 63 2e |..playin|g music.|
|00002260| 20 46 69 72 73 74 2c 20 | 74 68 65 20 63 6f 6d 70 | First, |the comp|
|00002270| 6c 65 74 65 20 70 72 6f | 67 72 61 6d 20 73 6f 75 |lete pro|gram sou|
|00002280| 72 63 65 20 69 73 20 67 | 69 76 65 6e 20 69 6e 20 |rce is g|iven in |
|00002290| 62 6f 74 68 20 43 20 61 | 6e 64 0d 0a 44 65 6c 70 |both C a|nd..Delp|
|000022a0| 68 69 20 66 6f 72 6d 61 | 74 2c 20 61 6e 64 20 61 |hi forma|t, and a|
|000022b0| 66 74 65 72 20 74 68 61 | 74 20 74 68 65 20 6f 70 |fter tha|t the op|
|000022c0| 65 72 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 70 |eration |of the p|
|000022d0| 72 6f 67 72 61 6d 20 69 | 73 20 64 65 73 63 72 69 |rogram i|s descri|
|000022e0| 62 65 64 20 6c 69 6e 65 | 0d 0a 62 79 20 6c 69 6e |bed line|..by lin|
|000022f0| 65 2e 20 54 6f 20 6b 65 | 65 70 20 74 68 65 20 70 |e. To ke|ep the p|
|00002300| 72 6f 67 72 61 6d 20 61 | 73 20 73 68 6f 72 74 20 |rogram a|s short |
|00002310| 61 73 20 70 6f 73 73 69 | 62 6c 65 2c 20 61 6c 6c |as possi|ble, all|
|00002320| 20 65 72 72 6f 72 20 63 | 68 65 63 6b 69 6e 67 20 | error c|hecking |
|00002330| 69 73 0d 0a 6f 6d 69 74 | 74 65 64 2c 20 61 6e 64 |is..omit|ted, and|
|00002340| 20 74 68 65 72 65 66 6f | 72 65 20 69 74 20 73 68 | therefo|re it sh|
|00002350| 6f 75 6c 64 20 6e 6f 74 | 20 62 65 20 75 73 65 64 |ould not| be used|
|00002360| 20 61 73 20 61 20 74 65 | 6d 70 6c 61 74 65 20 66 | as a te|mplate f|
|00002370| 6f 72 20 62 75 69 6c 64 | 69 6e 67 20 72 65 61 6c |or build|ing real|
|00002380| 0d 0a 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 2d |..applic|ations -|
|00002390| 2d 2d 20 74 68 65 20 6f | 74 68 65 72 20 65 78 61 |-- the o|ther exa|
|000023a0| 6d 70 6c 65 20 70 72 6f | 67 72 61 6d 73 20 69 6e |mple pro|grams in|
|000023b0| 63 6c 75 64 65 64 20 69 | 6e 20 74 68 65 20 4d 49 |cluded i|n the MI|
|000023c0| 44 41 53 0d 0a 64 69 73 | 74 72 69 62 75 74 69 6f |DAS..dis|tributio|
|000023d0| 6e 20 61 72 65 20 6d 6f | 72 65 20 73 75 69 74 61 |n are mo|re suita|
|000023e0| 62 6c 65 20 66 6f 72 20 | 74 68 61 74 2e 0d 0a 0d |ble for |that....|
|000023f0| 0a 42 6f 74 68 20 76 65 | 72 73 69 6f 6e 73 20 6f |.Both ve|rsions o|
|00002400| 66 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 73 68 |f the pr|ogram sh|
|00002410| 6f 75 6c 64 20 62 65 20 | 63 6f 6d 70 69 6c 65 64 |ould be |compiled|
|00002420| 20 61 73 20 63 6f 6e 73 | 6f 6c 65 20 61 70 70 6c | as cons|ole appl|
|00002430| 69 63 61 74 69 6f 6e 73 | 20 69 6e 0d 0a 74 68 65 |ications| in..the|
|00002440| 20 57 69 6e 33 32 20 65 | 6e 76 69 72 6f 6e 6d 65 | Win32 e|nvironme|
|00002450| 6e 74 2e 20 55 6e 64 65 | 72 20 4d 53 2d 44 4f 53 |nt. Unde|r MS-DOS|
|00002460| 20 61 6e 64 20 4c 69 6e | 75 78 20 74 68 65 20 64 | and Lin|ux the d|
|00002470| 65 66 61 75 6c 74 20 63 | 6f 6d 70 69 6c 65 72 20 |efault c|ompiler |
|00002480| 73 65 74 74 69 6e 67 73 | 0d 0a 61 72 65 20 66 69 |settings|..are fi|
|00002490| 6e 65 2e 0d 0a 0d 0a 0d | 0a 5c 73 75 62 73 65 63 |ne......|.\subsec|
|000024a0| 74 69 6f 6e 7b 43 20 70 | 72 6f 67 72 61 6d 7d 0d |tion{C p|rogram}.|
|000024b0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |...\begi|n{verbat|
|000024c0| 69 6d 7d 0d 0a 20 31 20 | 20 23 69 6e 63 6c 75 64 |im}.. 1 | #includ|
|000024d0| 65 20 3c 73 74 64 69 6f | 2e 68 3e 0d 0a 20 32 20 |e <stdio|.h>.. 2 |
|000024e0| 20 23 69 6e 63 6c 75 64 | 65 20 3c 63 6f 6e 69 6f | #includ|e <conio|
|000024f0| 2e 68 3e 0d 0a 20 33 20 | 20 23 69 6e 63 6c 75 64 |.h>.. 3 | #includ|
|00002500| 65 20 22 6d 69 64 61 73 | 64 6c 6c 2e 68 22 0d 0a |e "midas|dll.h"..|
|00002510| 20 34 0d 0a 20 35 20 20 | 69 6e 74 20 6d 61 69 6e | 4.. 5 |int main|
|00002520| 28 76 6f 69 64 29 0d 0a | 20 36 20 20 7b 0d 0a 20 |(void)..| 6 {.. |
|00002530| 37 20 20 20 20 20 20 4d | 49 44 41 53 6d 6f 64 75 |7 M|IDASmodu|
|00002540| 6c 65 20 6d 6f 64 75 6c | 65 3b 0d 0a 20 38 0d 0a |le modul|e;.. 8..|
|00002550| 20 39 20 20 20 20 20 20 | 4d 49 44 41 53 73 74 61 | 9 |MIDASsta|
|00002560| 72 74 75 70 28 29 3b 0d | 0a 31 30 20 20 20 20 20 |rtup();.|.10 |
|00002570| 20 4d 49 44 41 53 69 6e | 69 74 28 29 3b 0d 0a 31 | MIDASin|it();..1|
|00002580| 31 20 20 20 20 20 20 4d | 49 44 41 53 73 74 61 72 |1 M|IDASstar|
|00002590| 74 42 61 63 6b 67 72 6f | 75 6e 64 50 6c 61 79 28 |tBackgro|undPlay(|
|000025a0| 30 29 3b 0d 0a 31 32 0d | 0a 31 33 20 20 20 20 20 |0);..12.|.13 |
|000025b0| 20 6d 6f 64 75 6c 65 20 | 3d 20 4d 49 44 41 53 6c | module |= MIDASl|
|000025c0| 6f 61 64 4d 6f 64 75 6c | 65 28 22 2e 2e 5c 5c 64 |oadModul|e("..\\d|
|000025d0| 61 74 61 5c 5c 74 65 6d | 70 6c 73 75 6e 2e 78 6d |ata\\tem|plsun.xm|
|000025e0| 22 29 3b 0d 0a 31 34 20 | 20 20 20 20 20 4d 49 44 |");..14 | MID|
|000025f0| 41 53 70 6c 61 79 4d 6f | 64 75 6c 65 28 6d 6f 64 |ASplayMo|dule(mod|
|00002600| 75 6c 65 2c 20 30 29 3b | 0d 0a 31 35 0d 0a 31 36 |ule, 0);|..15..16|
|00002610| 20 20 20 20 20 20 70 75 | 74 73 28 22 50 6c 61 79 | pu|ts("Play|
|00002620| 69 6e 67 20 2d 20 70 72 | 65 73 73 20 61 6e 79 20 |ing - pr|ess any |
|00002630| 6b 65 79 22 29 3b 0d 0a | 31 37 20 20 20 20 20 20 |key");..|17 |
|00002640| 67 65 74 63 68 28 29 3b | 0d 0a 31 38 0d 0a 31 39 |getch();|..18..19|
|00002650| 20 20 20 20 20 20 4d 49 | 44 41 53 73 74 6f 70 4d | MI|DASstopM|
|00002660| 6f 64 75 6c 65 28 6d 6f | 64 75 6c 65 29 3b 0d 0a |odule(mo|dule);..|
|00002670| 32 30 20 20 20 20 20 20 | 4d 49 44 41 53 66 72 65 |20 |MIDASfre|
|00002680| 65 4d 6f 64 75 6c 65 28 | 6d 6f 64 75 6c 65 29 3b |eModule(|module);|
|00002690| 0d 0a 32 31 0d 0a 32 32 | 20 20 20 20 20 20 4d 49 |..21..22| MI|
|000026a0| 44 41 53 73 74 6f 70 42 | 61 63 6b 67 72 6f 75 6e |DASstopB|ackgroun|
|000026b0| 64 50 6c 61 79 28 29 3b | 0d 0a 32 33 20 20 20 20 |dPlay();|..23 |
|000026c0| 20 20 4d 49 44 41 53 63 | 6c 6f 73 65 28 29 3b 0d | MIDASc|lose();.|
|000026d0| 0a 32 34 0d 0a 32 35 20 | 20 20 20 20 20 72 65 74 |.24..25 | ret|
|000026e0| 75 72 6e 20 30 3b 0d 0a | 32 36 20 20 7d 0d 0a 5c |urn 0;..|26 }..\|
|000026f0| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0d 0a 0d |end{verb|atim}...|
|00002700| 0a 0d 0a 0d 0a 5c 73 75 | 62 73 65 63 74 69 6f 6e |.....\su|bsection|
|00002710| 7b 44 65 6c 70 68 69 20 | 70 72 6f 67 72 61 6d 7d |{Delphi |program}|
|00002720| 0d 0a 0d 0a 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |....\beg|in{verba|
|00002730| 74 69 6d 7d 0d 0a 31 20 | 20 20 75 73 65 73 20 6d |tim}..1 | uses m|
|00002740| 69 64 61 73 64 6c 6c 3b | 0d 0a 32 0d 0a 33 20 20 |idasdll;|..2..3 |
|00002750| 20 76 61 72 20 6d 6f 64 | 75 6c 65 20 3a 20 4d 49 | var mod|ule : MI|
|00002760| 44 41 53 6d 6f 64 75 6c | 65 3b 0d 0a 34 0d 0a 35 |DASmodul|e;..4..5|
|00002770| 20 20 20 42 45 47 49 4e | 0d 0a 36 20 20 20 20 20 | BEGIN|..6 |
|00002780| 20 20 4d 49 44 41 53 73 | 74 61 72 74 75 70 3b 0d | MIDASs|tartup;.|
|00002790| 0a 37 20 20 20 20 20 20 | 20 4d 49 44 41 53 69 6e |.7 | MIDASin|
|000027a0| 69 74 3b 0d 0a 38 20 20 | 20 20 20 20 20 4d 49 44 |it;..8 | MID|
|000027b0| 41 53 73 74 61 72 74 42 | 61 63 6b 67 72 6f 75 6e |ASstartB|ackgroun|
|000027c0| 64 50 6c 61 79 28 30 29 | 0d 0a 39 0d 0a 31 30 20 |dPlay(0)|..9..10 |
|000027d0| 20 20 20 20 20 6d 6f 64 | 75 6c 65 20 3a 3d 20 4d | mod|ule := M|
|000027e0| 49 44 41 53 6c 6f 61 64 | 4d 6f 64 75 6c 65 28 27 |IDASload|Module('|
|000027f0| 2e 2e 5c 64 61 74 61 5c | 74 65 6d 70 6c 73 75 6e |..\data\|templsun|
|00002800| 2e 78 6d 27 29 3b 0d 0a | 31 31 20 20 20 20 20 20 |.xm');..|11 |
|00002810| 4d 49 44 41 53 70 6c 61 | 79 4d 6f 64 75 6c 65 28 |MIDASpla|yModule(|
|00002820| 6d 6f 64 75 6c 65 2c 20 | 30 29 3b 0d 0a 31 32 0d |module, |0);..12.|
|00002830| 0a 31 33 20 20 20 20 20 | 20 57 72 69 74 65 4c 6e |.13 | WriteLn|
|00002840| 28 27 50 6c 61 79 69 6e | 67 20 2d 20 50 72 65 73 |('Playin|g - Pres|
|00002850| 73 20 45 6e 74 65 72 27 | 29 3b 0d 0a 31 34 20 20 |s Enter'|);..14 |
|00002860| 20 20 20 20 52 65 61 64 | 4c 6e 3b 0d 0a 31 35 0d | Read|Ln;..15.|
|00002870| 0a 31 36 20 20 20 20 20 | 20 4d 49 44 41 53 73 74 |.16 | MIDASst|
|00002880| 6f 70 4d 6f 64 75 6c 65 | 28 6d 6f 64 75 6c 65 29 |opModule|(module)|
|00002890| 3b 0d 0a 31 37 20 20 20 | 20 20 20 4d 49 44 41 53 |;..17 | MIDAS|
|000028a0| 66 72 65 65 4d 6f 64 75 | 6c 65 28 6d 6f 64 75 6c |freeModu|le(modul|
|000028b0| 65 29 3b 0d 0a 31 38 0d | 0a 31 39 20 20 20 20 20 |e);..18.|.19 |
|000028c0| 20 4d 49 44 41 53 73 74 | 6f 70 42 61 63 6b 67 72 | MIDASst|opBackgr|
|000028d0| 6f 75 6e 64 50 6c 61 79 | 3b 0d 0a 32 30 20 20 20 |oundPlay|;..20 |
|000028e0| 20 20 20 4d 49 44 41 53 | 63 6c 6f 73 65 3b 0d 0a | MIDAS|close;..|
|000028f0| 32 31 20 20 45 4e 44 2e | 0d 0a 5c 65 6e 64 7b 76 |21 END.|..\end{v|
|00002900| 65 72 62 61 74 69 6d 7d | 0d 0a 0d 0a 0d 0a 5c 73 |erbatim}|......\s|
|00002910| 75 62 73 65 63 74 69 6f | 6e 7b 50 72 6f 67 72 61 |ubsectio|n{Progra|
|00002920| 6d 20 64 65 73 63 72 69 | 70 74 69 6f 6e 7d 0d 0a |m descri|ption}..|
|00002930| 0d 0a 41 70 61 72 74 20 | 66 72 6f 6d 20 6d 69 6e |..Apart |from min|
|00002940| 6f 72 20 73 79 6e 74 61 | 78 20 64 69 66 66 65 72 |or synta|x differ|
|00002950| 65 6e 63 65 73 2c 20 74 | 68 65 20 43 20 61 6e 64 |ences, t|he C and|
|00002960| 20 44 65 6c 70 68 69 20 | 76 65 72 73 69 6f 6e 73 | Delphi |versions|
|00002970| 20 6f 66 20 74 68 65 20 | 70 72 6f 67 72 61 6d 0d | of the |program.|
|00002980| 0a 77 6f 72 6b 20 6e 65 | 61 72 6c 79 20 69 64 65 |.work ne|arly ide|
|00002990| 6e 74 69 63 61 6c 6c 79 | 2e 20 54 68 69 73 20 73 |ntically|. This s|
|000029a0| 65 63 74 69 6f 6e 20 64 | 65 73 63 72 69 62 65 73 |ection d|escribes|
|000029b0| 20 74 68 65 20 6f 70 65 | 72 61 74 69 6f 6e 20 6f | the ope|ration o|
|000029c0| 66 20 74 68 65 20 70 72 | 6f 67 72 61 6d 73 0d 0a |f the pr|ograms..|
|000029d0| 6c 69 6e 65 20 62 79 20 | 6c 69 6e 65 2e 20 54 68 |line by |line. Th|
|000029e0| 65 20 6c 69 6e 65 20 6e | 75 6d 62 65 72 73 20 62 |e line n|umbers b|
|000029f0| 65 6c 6f 77 20 61 72 65 | 20 67 69 76 65 6e 20 69 |elow are| given i|
|00002a00| 6e 20 70 61 69 72 73 3a | 20 66 69 72 73 74 20 66 |n pairs:| first f|
|00002a10| 6f 72 20 43 2c 20 73 65 | 63 6f 6e 64 0d 0a 66 6f |or C, se|cond..fo|
|00002a20| 72 20 44 65 6c 70 68 69 | 2e 0d 0a 0d 0a 5c 62 65 |r Delphi|.....\be|
|00002a30| 67 69 6e 7b 64 65 73 63 | 72 69 70 74 69 6f 6e 7d |gin{desc|ription}|
|00002a40| 0d 0a 20 20 20 20 5c 69 | 74 65 6d 20 5b 31 2d 33 |.. \i|tem [1-3|
|00002a50| 2c 20 31 5d 20 49 6e 63 | 6c 75 64 65 73 20 6e 65 |, 1] Inc|ludes ne|
|00002a60| 63 65 73 73 61 72 79 20 | 73 79 73 74 65 6d 20 61 |cessary |system a|
|00002a70| 6e 64 20 4d 49 44 41 53 | 20 64 65 66 69 6e 69 74 |nd MIDAS| definit|
|00002a80| 69 6f 6e 20 66 69 6c 65 | 73 0d 0a 20 20 20 20 5c |ion file|s.. \|
|00002a90| 69 74 65 6d 20 5b 37 2c | 20 33 5d 20 44 65 66 69 |item [7,| 3] Defi|
|00002aa0| 6e 65 73 20 61 20 76 61 | 72 69 61 62 6c 65 20 66 |nes a va|riable f|
|00002ab0| 6f 72 20 74 68 65 20 6d | 6f 64 75 6c 65 20 74 68 |or the m|odule th|
|00002ac0| 61 74 20 77 69 6c 6c 20 | 62 65 20 70 6c 61 79 65 |at will |be playe|
|00002ad0| 64 0d 0a 20 20 20 20 5c | 69 74 65 6d 20 5b 39 2c |d.. \|item [9,|
|00002ae0| 20 36 5d 20 52 65 73 65 | 74 73 20 74 68 65 20 4d | 6] Rese|ts the M|
|00002af0| 49 44 41 53 20 69 6e 74 | 65 72 6e 61 6c 20 73 74 |IDAS int|ernal st|
|00002b00| 61 74 65 20 2d 2d 2d 20 | 54 68 69 73 20 6e 65 65 |ate --- |This nee|
|00002b10| 64 73 20 74 6f 20 62 65 | 20 64 6f 6e 65 0d 0a 20 |ds to be| done.. |
|00002b20| 20 20 20 20 20 20 20 62 | 65 66 6f 72 65 20 4d 49 | b|efore MI|
|00002b30| 44 41 53 20 69 73 20 63 | 6f 6e 66 69 67 75 72 65 |DAS is c|onfigure|
|00002b40| 64 20 61 6e 64 20 69 6e | 69 74 69 61 6c 69 7a 65 |d and in|itialize|
|00002b50| 64 2e 0d 0a 20 20 20 20 | 5c 69 74 65 6d 20 5b 31 |d... |\item [1|
|00002b60| 30 2c 20 37 5d 20 49 6e | 69 74 69 61 6c 69 7a 65 |0, 7] In|itialize|
|00002b70| 73 20 4d 49 44 41 53 0d | 0a 20 20 20 20 5c 69 74 |s MIDAS.|. \it|
|00002b80| 65 6d 20 5b 31 31 2c 20 | 38 5d 20 53 74 61 72 74 |em [11, |8] Start|
|00002b90| 73 20 70 6c 61 79 69 6e | 67 20 73 6f 75 6e 64 20 |s playin|g sound |
|00002ba0| 69 6e 20 74 68 65 20 62 | 61 63 6b 67 72 6f 75 6e |in the b|ackgroun|
|00002bb0| 64 0d 0a 20 20 20 20 5c | 69 74 65 6d 20 5b 31 33 |d.. \|item [13|
|00002bc0| 2c 20 31 30 5d 20 4c 6f | 61 64 73 20 74 68 65 20 |, 10] Lo|ads the |
|00002bd0| 6d 6f 64 75 6c 65 20 66 | 69 6c 65 0d 0a 20 20 20 |module f|ile.. |
|00002be0| 20 5c 69 74 65 6d 20 5b | 31 34 2c 20 31 31 5d 20 | \item [|14, 11] |
|00002bf0| 53 74 61 72 74 73 20 70 | 6c 61 79 69 6e 67 20 74 |Starts p|laying t|
|00002c00| 68 65 20 6d 6f 64 75 6c | 65 20 77 65 20 6a 75 73 |he modul|e we jus|
|00002c10| 74 20 6c 6f 61 64 65 64 | 2c 20 6c 65 61 76 69 6e |t loaded|, leavin|
|00002c20| 67 20 6e 6f 0d 0a 20 20 | 20 20 20 20 20 20 63 68 |g no.. | ch|
|00002c30| 61 6e 6e 65 6c 73 20 61 | 76 61 69 6c 61 62 6c 65 |annels a|vailable|
|00002c40| 20 66 6f 72 20 73 6f 75 | 6e 64 20 65 66 66 65 63 | for sou|nd effec|
|00002c50| 74 73 2e 0d 0a 20 20 20 | 20 5c 69 74 65 6d 20 5b |ts... | \item [|
|00002c60| 31 36 2d 31 37 2c 20 31 | 33 2d 31 34 5d 20 53 69 |16-17, 1|3-14] Si|
|00002c70| 6d 70 6c 79 20 77 61 69 | 74 73 20 66 6f 72 20 61 |mply wai|ts for a|
|00002c80| 20 6b 65 79 70 72 65 73 | 73 0d 0a 20 20 20 20 5c | keypres|s.. \|
|00002c90| 69 74 65 6d 20 5b 31 39 | 2c 20 31 36 5d 20 53 74 |item [19|, 16] St|
|00002ca0| 6f 70 73 20 70 6c 61 79 | 69 6e 67 20 74 68 65 20 |ops play|ing the |
|00002cb0| 6d 6f 64 75 6c 65 0d 0a | 20 20 20 20 5c 69 74 65 |module..| \ite|
|00002cc0| 6d 20 5b 32 30 2c 20 31 | 37 5d 20 44 65 61 6c 6c |m [20, 1|7] Deall|
|00002cd0| 6f 63 61 74 65 73 20 74 | 68 65 20 6d 6f 64 75 6c |ocates t|he modul|
|00002ce0| 65 20 77 65 20 6c 6f 61 | 64 65 64 0d 0a 20 20 20 |e we loa|ded.. |
|00002cf0| 20 5c 69 74 65 6d 20 5b | 32 32 2c 20 31 39 5d 20 | \item [|22, 19] |
|00002d00| 53 74 6f 70 73 20 70 6c | 61 79 69 6e 67 20 73 6f |Stops pl|aying so|
|00002d10| 75 6e 64 20 69 6e 20 74 | 68 65 20 62 61 63 6b 67 |und in t|he backg|
|00002d20| 72 6f 75 6e 64 0d 0a 20 | 20 20 20 5c 69 74 65 6d |round.. | \item|
|00002d30| 20 5b 32 33 2c 20 32 30 | 5d 20 55 6e 69 6e 69 74 | [23, 20|] Uninit|
|00002d40| 69 61 6c 69 7a 65 73 20 | 74 68 65 20 4d 49 44 41 |ializes |the MIDA|
|00002d50| 53 20 53 6f 75 6e 64 20 | 53 79 73 74 65 6d 0d 0a |S Sound |System..|
|00002d60| 5c 65 6e 64 7b 64 65 73 | 63 72 69 70 74 69 6f 6e |\end{des|cription|
|00002d70| 7d 0d 0a 0d 0a 0d 0a 0d | 0a 0d 0a 5c 63 68 61 70 |}.......|...\chap|
|00002d80| 74 65 72 7b 4d 49 44 41 | 53 20 63 6f 6e 63 65 70 |ter{MIDA|S concep|
|00002d90| 74 73 7d 0d 0a 0d 0a 54 | 68 69 73 20 63 68 61 70 |ts}....T|his chap|
|00002da0| 74 65 72 20 64 65 73 63 | 72 69 62 65 73 20 62 61 |ter desc|ribes ba|
|00002db0| 73 69 63 20 4d 49 44 41 | 53 20 63 6f 6e 63 65 70 |sic MIDA|S concep|
|00002dc0| 74 73 20 61 6e 64 20 74 | 65 72 6d 69 6e 6f 6c 6f |ts and t|erminolo|
|00002dd0| 67 79 2e 20 54 68 65 20 | 64 65 73 63 72 69 70 74 |gy. The |descript|
|00002de0| 69 6f 6e 0d 0a 69 73 20 | 64 6f 6e 65 20 61 74 20 |ion..is |done at |
|00002df0| 61 20 72 61 74 68 65 72 | 20 68 69 67 68 20 6c 65 |a rather| high le|
|00002e00| 76 65 6c 2c 20 61 6e 64 | 20 69 73 20 6b 65 70 74 |vel, and| is kept|
|00002e10| 20 72 61 74 68 65 72 20 | 69 6e 66 6f 72 6d 61 6c | rather |informal|
|00002e20| 20 2d 2d 2d 20 74 68 65 | 20 69 6e 74 65 6e 74 69 | --- the| intenti|
|00002e30| 6f 6e 0d 0a 69 73 20 74 | 6f 20 64 6f 63 75 6d 65 |on..is t|o docume|
|00002e40| 6e 74 20 77 68 61 74 20 | 74 68 65 20 64 69 66 66 |nt what |the diff|
|00002e50| 65 72 65 6e 74 20 74 65 | 72 6d 73 20 6d 65 61 6e |erent te|rms mean|
|00002e60| 20 66 72 6f 6d 20 74 68 | 65 20 75 73 65 72 27 73 | from th|e user's|
|00002e70| 20 70 6f 69 6e 74 20 6f | 66 20 76 69 65 77 2c 0d | point o|f view,.|
|00002e80| 0a 61 6e 64 20 77 68 61 | 74 20 63 61 6e 20 62 65 |.and wha|t can be|
|00002e90| 20 64 6f 6e 65 20 77 69 | 74 68 20 74 68 65 6d 2c | done wi|th them,|
|00002ea0| 20 72 61 74 68 65 72 20 | 74 68 61 6e 20 74 6f 20 | rather |than to |
|00002eb0| 67 69 76 65 20 64 65 74 | 61 69 6c 65 64 20 69 6e |give det|ailed in|
|00002ec0| 66 6f 72 6d 61 74 69 6f | 6e 20 6f 6e 0d 0a 74 68 |formatio|n on..th|
|00002ed0| 65 69 72 20 75 73 61 67 | 65 2e 20 53 74 65 70 2d |eir usag|e. Step-|
|00002ee0| 62 79 2d 73 74 65 70 20 | 69 6e 73 74 72 75 63 74 |by-step |instruct|
|00002ef0| 69 6f 6e 73 20 66 6f 72 | 20 75 73 69 6e 67 20 74 |ions for| using t|
|00002f00| 68 65 20 64 69 66 66 65 | 72 65 6e 74 20 4d 49 44 |he diffe|rent MID|
|00002f10| 41 53 20 66 65 61 74 75 | 72 65 73 0d 0a 69 73 20 |AS featu|res..is |
|00002f20| 61 76 61 69 6c 61 62 6c | 65 20 69 6e 20 74 68 65 |availabl|e in the|
|00002f30| 20 6e 65 78 74 20 63 68 | 61 70 74 65 72 2e 0d 0a | next ch|apter...|
|00002f40| 0d 0a 0d 0a 5c 73 65 63 | 74 69 6f 6e 7b 53 61 6d |....\sec|tion{Sam|
|00002f50| 70 6c 65 73 7d 0d 0a 0d | 0a 41 20 73 61 6d 70 6c |ples}...|.A sampl|
|00002f60| 65 20 69 6e 20 4d 49 44 | 41 53 20 53 6f 75 6e 64 |e in MID|AS Sound|
|00002f70| 20 53 79 73 74 65 6d 20 | 69 6e 63 6c 75 64 65 73 | System |includes|
|00002f80| 20 74 68 65 20 73 61 6d | 70 6c 65 20 64 61 74 61 | the sam|ple data|
|00002f90| 20 66 6f 72 20 61 20 73 | 6f 75 6e 64 20 73 61 6d | for a s|ound sam|
|00002fa0| 70 6c 65 2c 0d 0a 70 6c | 75 73 20 69 6e 66 6f 72 |ple,..pl|us infor|
|00002fb0| 6d 61 74 69 6f 6e 20 6f | 6e 20 69 74 73 20 64 61 |mation o|n its da|
|00002fc0| 74 61 20 74 79 70 65 2c | 20 74 68 65 20 73 61 6d |ta type,| the sam|
|00002fd0| 70 6c 65 20 6c 65 6e 67 | 74 68 20 61 6e 64 20 6c |ple leng|th and l|
|00002fe0| 6f 6f 70 69 6e 67 20 69 | 6e 66 6f 72 6d 61 74 69 |ooping i|nformati|
|00002ff0| 6f 6e 2e 0d 0a 49 74 20 | 64 6f 65 73 20 6e 6f 74 |on...It |does not|
|00003000| 20 63 6f 6e 74 61 69 6e | 20 6f 74 68 65 72 20 61 | contain| other a|
|00003010| 74 74 72 69 62 75 74 65 | 73 20 73 75 63 68 20 61 |ttribute|s such a|
|00003020| 73 20 76 6f 6c 75 6d 65 | 20 6f 72 20 70 61 6e 6e |s volume| or pann|
|00003030| 69 6e 67 20 2d 2d 2d 20 | 74 68 65 73 65 20 61 72 |ing --- |these ar|
|00003040| 65 0d 0a 69 6e 73 74 72 | 75 6d 65 6e 74 20 70 72 |e..instr|ument pr|
|00003050| 6f 70 65 72 74 69 65 73 | 2e 20 49 6e 20 4d 49 44 |operties|. In MID|
|00003060| 41 53 2c 20 73 61 6d 70 | 6c 65 73 20 61 72 65 20 |AS, samp|les are |
|00003070| 6d 61 6e 61 67 65 64 20 | 61 6e 64 20 73 74 6f 72 |managed |and stor|
|00003080| 65 64 20 62 79 20 62 79 | 20 53 6f 75 6e 64 0d 0a |ed by by| Sound..|
|00003090| 44 65 76 69 63 65 73 2e | 20 41 20 73 61 6d 70 6c |Devices.| A sampl|
|000030a0| 65 20 69 73 20 69 64 65 | 6e 74 69 66 69 65 64 20 |e is ide|ntified |
|000030b0| 62 79 20 61 20 73 61 6d | 70 6c 65 20 68 61 6e 64 |by a sam|ple hand|
|000030c0| 6c 65 2c 20 61 6e 64 20 | 74 68 69 73 20 73 61 6d |le, and |this sam|
|000030d0| 70 6c 65 20 68 61 6e 64 | 6c 65 0d 0a 63 61 6e 20 |ple hand|le..can |
|000030e0| 62 65 20 75 73 65 64 20 | 74 6f 20 70 6c 61 79 20 |be used |to play |
|000030f0| 74 68 65 20 73 61 6d 70 | 6c 65 20 6f 72 20 72 65 |the samp|le or re|
|00003100| 6d 6f 76 65 20 69 74 20 | 66 72 6f 6d 20 53 6f 75 |move it |from Sou|
|00003110| 6e 64 20 44 65 76 69 63 | 65 20 73 74 6f 72 61 67 |nd Devic|e storag|
|00003120| 65 2e 0d 0a 0d 0a 0d 0a | 5c 73 65 63 74 69 6f 6e |e.......|\section|
|00003130| 7b 53 74 72 65 61 6d 73 | 7d 0d 0a 0d 0a 49 6e 20 |{Streams|}....In |
|00003140| 4d 49 44 41 53 2c 20 73 | 74 72 65 61 6d 73 20 61 |MIDAS, s|treams a|
|00003150| 72 65 20 63 6f 6e 74 69 | 6e 75 6f 75 73 20 66 6c |re conti|nuous fl|
|00003160| 6f 77 73 20 6f 66 20 73 | 61 6d 70 6c 65 20 64 61 |ows of s|ample da|
|00003170| 74 61 2e 20 55 6e 6c 69 | 6b 65 20 73 61 6d 70 6c |ta. Unli|ke sampl|
|00003180| 65 73 2c 0d 0a 73 74 72 | 65 61 6d 73 20 61 72 65 |es,..str|eams are|
|00003190| 20 6e 6f 74 20 73 74 6f | 72 65 64 20 69 6e 20 74 | not sto|red in t|
|000031a0| 68 65 20 53 6f 75 6e 64 | 20 44 65 76 69 63 65 73 |he Sound| Devices|
|000031b0| 20 74 68 65 6d 73 65 6c | 76 65 73 2c 20 62 75 74 | themsel|ves, but|
|000031c0| 20 61 72 65 20 69 6e 73 | 74 65 61 64 20 72 65 61 | are ins|tead rea|
|000031d0| 64 0d 0a 66 72 6f 6d 20 | 74 68 65 20 73 79 73 74 |d..from |the syst|
|000031e0| 65 6d 20 6d 65 6d 6f 72 | 79 20 61 73 20 74 68 65 |em memor|y as the|
|000031f0| 79 20 61 72 65 20 70 6c | 61 79 65 64 2e 20 42 65 |y are pl|ayed. Be|
|00003200| 63 61 75 73 65 20 6f 66 | 20 74 68 69 73 2c 20 74 |cause of| this, t|
|00003210| 68 65 20 63 6f 6d 70 6c | 65 74 65 20 64 61 74 61 |he compl|ete data|
|00003220| 0d 0a 66 6f 72 20 74 68 | 65 20 73 74 72 65 61 6d |..for th|e stream|
|00003230| 20 64 6f 65 73 20 6e 6f | 74 20 6e 65 65 64 20 74 | does no|t need t|
|00003240| 6f 20 62 65 20 61 76 61 | 69 6c 61 62 6c 65 20 77 |o be ava|ilable w|
|00003250| 68 65 6e 20 70 6c 61 79 | 69 6e 67 20 73 74 61 72 |hen play|ing star|
|00003260| 74 73 2c 20 62 75 74 20 | 63 61 6e 0d 0a 69 6e 73 |ts, but |can..ins|
|00003270| 74 65 61 64 20 62 65 20 | 72 65 61 64 20 66 72 6f |tead be |read fro|
|00003280| 6d 20 64 69 73 6b 2c 20 | 6f 72 20 65 76 65 6e 20 |m disk, |or even |
|00003290| 67 65 6e 65 72 61 74 65 | 64 20 6f 6e 20 74 68 65 |generate|d on the|
|000032a0| 20 66 6c 79 2c 20 61 73 | 20 70 6c 61 79 62 61 63 | fly, as| playbac|
|000032b0| 6b 0d 0a 70 72 6f 63 65 | 65 64 73 2e 20 54 68 65 |k..proce|eds. The|
|000032c0| 20 70 6c 61 79 62 61 63 | 6b 20 70 72 6f 70 65 72 | playbac|k proper|
|000032d0| 74 69 65 73 20 6f 66 20 | 74 68 65 20 73 74 72 65 |ties of |the stre|
|000032e0| 61 6d 20 2d 2d 2d 20 73 | 61 6d 70 6c 69 6e 67 20 |am --- s|ampling |
|000032f0| 72 61 74 65 2c 20 76 6f | 6c 75 6d 65 20 61 6e 64 |rate, vo|lume and|
|00003300| 0d 0a 70 61 6e 6e 69 6e | 67 20 2d 2d 2d 20 63 61 |..pannin|g --- ca|
|00003310| 6e 20 62 65 20 63 68 61 | 6e 67 65 64 20 69 6e 20 |n be cha|nged in |
|00003320| 72 65 61 6c 20 74 69 6d | 65 20 6a 75 73 74 20 6c |real tim|e just l|
|00003330| 69 6b 65 20 74 68 6f 73 | 65 20 6f 66 20 61 20 73 |ike thos|e of a s|
|00003340| 61 6d 70 6c 65 2e 20 48 | 6f 77 65 76 65 72 2c 0d |ample. H|owever,.|
|00003350| 0a 61 73 20 74 68 65 20 | 73 61 6d 70 6c 65 20 64 |.as the |sample d|
|00003360| 61 74 61 20 66 6f 72 20 | 74 68 65 20 73 74 72 65 |ata for |the stre|
|00003370| 61 6d 20 69 73 20 6e 6f | 74 20 73 74 6f 72 65 64 |am is no|t stored|
|00003380| 20 61 6e 79 77 68 65 72 | 65 20 69 6e 20 74 68 65 | anywher|e in the|
|00003390| 20 53 6f 75 6e 64 20 44 | 65 76 69 63 65 2c 0d 0a | Sound D|evice,..|
|000033a0| 65 61 63 68 20 73 74 72 | 65 61 6d 20 63 61 6e 20 |each str|eam can |
|000033b0| 6f 6e 6c 79 20 62 65 20 | 70 6c 61 79 65 64 20 6f |only be |played o|
|000033c0| 6e 63 65 2e 0d 0a 0d 0a | 54 68 65 20 4d 49 44 41 |nce.....|The MIDA|
|000033d0| 53 20 41 50 49 20 6f 66 | 66 65 72 73 20 74 68 72 |S API of|fers thr|
|000033e0| 65 65 20 77 61 79 73 20 | 66 6f 72 20 70 6c 61 79 |ee ways |for play|
|000033f0| 69 6e 67 20 73 74 72 65 | 61 6d 73 3a 20 66 69 6c |ing stre|ams: fil|
|00003400| 65 20 70 6c 61 79 62 61 | 63 6b 2c 20 70 6f 6c 6c |e playba|ck, poll|
|00003410| 69 6e 67 0d 0a 70 6c 61 | 79 62 61 63 6b 20 61 6e |ing..pla|yback an|
|00003420| 64 20 63 61 6c 6c 62 61 | 63 6b 73 2e 20 46 6f 72 |d callba|cks. For|
|00003430| 20 66 69 6c 65 20 70 6c | 61 79 62 61 63 6b 2c 20 | file pl|ayback, |
|00003440| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication |
|00003450| 73 69 6d 70 6c 79 20 73 | 75 70 70 6c 69 65 73 0d |simply s|upplies.|
|00003460| 0a 74 68 65 20 73 79 73 | 74 65 6d 20 74 68 65 20 |.the sys|tem the |
|00003470| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 66 69 6c 65 |name of |the file|
|00003480| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 74 68 65 20 | contain|ing the |
|00003490| 73 61 6d 70 6c 65 20 64 | 61 74 61 20 66 6f 72 20 |sample d|ata for |
|000034a0| 74 68 65 20 73 74 72 65 | 61 6d 2c 0d 0a 61 6e 64 |the stre|am,..and|
|000034b0| 20 70 6c 61 79 62 61 63 | 6b 20 70 72 6f 63 65 65 | playbac|k procee|
|000034c0| 64 73 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |ds autom|atically|
|000034d0| 2e 20 49 6e 20 70 6f 6c | 6c 69 6e 67 20 70 6c 61 |. In pol|ling pla|
|000034e0| 79 62 61 63 6b 20 6d 6f | 64 65 2c 20 74 68 65 0d |yback mo|de, the.|
|000034f0| 0a 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 6f 70 65 |.applica|tion ope|
|00003500| 6e 73 20 74 68 65 20 73 | 74 72 65 61 6d 20 61 6e |ns the s|tream an|
|00003510| 64 20 70 65 72 69 6f 64 | 69 63 61 6c 6c 79 20 66 |d period|ically f|
|00003520| 65 65 64 73 20 6e 65 77 | 20 73 61 6d 70 6c 65 20 |eeds new| sample |
|00003530| 64 61 74 61 20 74 6f 20 | 62 65 0d 0a 70 6c 61 79 |data to |be..play|
|00003540| 65 64 2e 20 49 6e 20 63 | 61 6c 6c 62 61 63 6b 20 |ed. In c|allback |
|00003550| 6d 6f 64 65 2c 20 74 68 | 65 20 61 70 70 6c 69 63 |mode, th|e applic|
|00003560| 61 74 69 6f 6e 20 73 65 | 74 73 20 61 20 63 61 6c |ation se|ts a cal|
|00003570| 6c 62 61 63 6b 20 66 75 | 6e 63 74 69 6f 6e 20 74 |lback fu|nction t|
|00003580| 68 61 74 20 69 73 0d 0a | 63 61 6c 6c 65 64 20 65 |hat is..|called e|
|00003590| 61 63 68 20 74 69 6d 65 | 20 74 68 65 20 73 74 72 |ach time| the str|
|000035a0| 65 61 6d 20 62 75 66 66 | 65 72 20 6c 6f 6f 70 73 |eam buff|er loops|
|000035b0| 2c 20 61 6e 64 20 63 61 | 6e 20 74 68 65 72 65 20 |, and ca|n there |
|000035c0| 66 69 6c 6c 20 74 68 65 | 20 62 75 66 66 65 72 20 |fill the| buffer |
|000035d0| 77 69 74 68 0d 0a 6e 65 | 77 20 73 61 6d 70 6c 65 |with..ne|w sample|
|000035e0| 20 64 61 74 61 2e 0d 0a | 0d 0a 54 68 65 20 6d 6f | data...|..The mo|
|000035f0| 73 74 20 6f 62 76 69 6f | 75 73 20 75 73 65 20 66 |st obvio|us use f|
|00003600| 6f 72 20 73 74 72 65 61 | 6d 73 20 69 73 20 74 6f |or strea|ms is to|
|00003610| 20 70 6c 61 79 20 6c 6f | 6e 67 20 73 65 63 74 69 | play lo|ng secti|
|00003620| 6f 6e 73 20 6f 66 20 64 | 69 67 69 74 61 6c 20 73 |ons of d|igital s|
|00003630| 6f 75 6e 64 20 6f 72 0d | 0a 6d 75 73 69 63 20 64 |ound or.|.music d|
|00003640| 69 72 65 63 74 6c 79 20 | 66 72 6f 6d 20 64 69 73 |irectly |from dis|
|00003650| 6b 2c 20 77 69 74 68 6f | 75 74 20 6e 65 65 64 69 |k, witho|ut needi|
|00003660| 6e 67 20 74 6f 20 6c 6f | 61 64 20 65 76 65 72 79 |ng to lo|ad every|
|00003670| 74 68 69 6e 67 20 69 6e | 74 6f 20 6d 65 6d 6f 72 |thing in|to memor|
|00003680| 79 0d 0a 66 69 72 73 74 | 2e 20 53 74 72 65 61 6d |y..first|. Stream|
|00003690| 20 70 6c 61 79 62 61 63 | 6b 20 63 6f 75 6c 64 20 | playbac|k could |
|000036a0| 61 6c 73 6f 20 62 65 20 | 75 73 65 64 20 74 6f 20 |also be |used to |
|000036b0| 6d 69 78 20 74 68 65 20 | 6f 75 74 70 75 74 20 6f |mix the |output o|
|000036c0| 66 20 61 20 73 65 70 61 | 72 61 74 65 0d 0a 73 6f |f a sepa|rate..so|
|000036d0| 75 6e 64 20 67 65 6e 65 | 72 61 74 6f 72 2c 20 73 |und gene|rator, s|
|000036e0| 75 63 68 20 61 73 20 61 | 20 73 70 65 65 63 68 20 |uch as a| speech |
|000036f0| 73 79 6e 74 68 65 73 69 | 7a 65 72 2c 20 77 69 74 |synthesi|zer, wit|
|00003700| 68 20 74 68 65 20 72 65 | 73 74 20 6f 66 20 74 68 |h the re|st of th|
|00003710| 65 20 73 6f 75 6e 64 20 | 61 6e 64 0d 0a 6d 75 73 |e sound |and..mus|
|00003720| 69 63 20 69 6e 20 74 68 | 65 20 73 79 73 74 65 6d |ic in th|e system|
|00003730| 2e 0d 0a 0d 0a 43 75 72 | 72 65 6e 74 6c 79 20 73 |.....Cur|rently s|
|00003740| 74 72 65 61 6d 73 20 63 | 61 6e 20 6f 6e 6c 79 20 |treams c|an only |
|00003750| 62 65 20 70 6c 61 79 65 | 64 20 77 69 74 68 20 73 |be playe|d with s|
|00003760| 6f 66 74 77 61 72 65 20 | 6d 69 78 69 6e 67 20 53 |oftware |mixing S|
|00003770| 6f 75 6e 64 20 44 65 76 | 69 63 65 73 2e 20 49 6e |ound Dev|ices. In|
|00003780| 0d 0a 61 64 64 69 74 69 | 6f 6e 2c 20 66 69 6c 65 |..additi|on, file|
|00003790| 20 70 6c 61 79 62 61 63 | 6b 20 69 73 20 6f 6e 6c | playbac|k is onl|
|000037a0| 79 20 70 6f 73 73 69 62 | 6c 65 20 75 6e 64 65 72 |y possib|le under|
|000037b0| 20 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 | operati|ng syste|
|000037c0| 6d 73 20 74 68 61 74 0d | 0a 73 75 70 70 6f 72 74 |ms that.|.support|
|000037d0| 20 6d 75 6c 74 69 74 68 | 72 65 61 64 69 6e 67 2e | multith|reading.|
|000037e0| 0d 0a 0d 0a 0d 0a 5c 73 | 65 63 74 69 6f 6e 7b 43 |......\s|ection{C|
|000037f0| 68 61 6e 6e 65 6c 73 7d | 0d 0a 0d 0a 49 6e 20 4d |hannels}|....In M|
|00003800| 49 44 41 53 20 53 6f 75 | 6e 64 20 53 79 73 74 65 |IDAS Sou|nd Syste|
|00003810| 6d 2c 20 63 68 61 6e 6e | 65 6c 73 20 61 72 65 20 |m, chann|els are |
|00003820| 75 73 65 64 20 74 6f 20 | 70 6c 61 79 20 74 68 65 |used to |play the|
|00003830| 20 73 6f 75 6e 64 2e 20 | 45 61 63 68 20 63 68 61 | sound. |Each cha|
|00003840| 6e 6e 65 6c 20 63 61 6e | 0d 0a 70 6c 61 79 20 6f |nnel can|..play o|
|00003850| 6e 65 20 73 61 6d 70 6c | 65 20 6f 72 20 73 74 72 |ne sampl|e or str|
|00003860| 65 61 6d 20 61 74 20 61 | 20 74 69 6d 65 2c 20 65 |eam at a| time, e|
|00003870| 69 74 68 65 72 20 6d 6f | 6e 6f 20 6f 72 20 73 74 |ither mo|no or st|
|00003880| 65 72 65 6f 2e 20 57 68 | 65 6e 20 61 20 6e 65 77 |ereo. Wh|en a new|
|00003890| 20 73 6f 75 6e 64 0d 0a | 69 73 20 70 6c 61 79 65 | sound..|is playe|
|000038a0| 64 20 6f 6e 20 61 20 63 | 68 61 6e 6e 65 6c 2c 20 |d on a c|hannel, |
|000038b0| 74 68 65 20 6f 6c 64 20 | 6f 6e 65 20 69 73 20 72 |the old |one is r|
|000038c0| 65 6d 6f 76 65 64 2e 20 | 41 20 63 68 61 6e 6e 65 |emoved. |A channe|
|000038d0| 6c 20 69 73 20 69 64 65 | 6e 74 69 66 69 65 64 20 |l is ide|ntified |
|000038e0| 62 79 20 61 0d 0a 63 68 | 61 6e 6e 65 6c 20 6e 75 |by a..ch|annel nu|
|000038f0| 6d 62 65 72 2c 20 77 68 | 69 63 68 20 72 61 6e 67 |mber, wh|ich rang|
|00003900| 65 20 66 72 6f 6d 20 7a | 65 72 6f 20 75 70 77 61 |e from z|ero upwa|
|00003910| 72 64 73 2e 0d 0a 0d 0a | 42 65 66 6f 72 65 20 61 |rds.....|Before a|
|00003920| 6e 79 20 73 6f 75 6e 64 | 20 63 61 6e 20 62 65 20 |ny sound| can be |
|00003930| 70 6c 61 79 65 64 2c 20 | 61 20 6e 75 6d 62 65 72 |played, |a number|
|00003940| 20 6f 66 20 63 68 61 6e | 6e 65 6c 73 20 6d 75 73 | of chan|nels mus|
|00003950| 74 20 62 65 20 6f 70 65 | 6e 65 64 20 66 72 6f 6d |t be ope|ned from|
|00003960| 20 74 68 65 0d 0a 53 6f | 75 6e 64 20 44 65 76 69 | the..So|und Devi|
|00003970| 63 65 2e 20 4d 49 44 41 | 53 20 73 75 70 70 6f 72 |ce. MIDA|S suppor|
|00003980| 74 73 20 61 6e 20 75 6e | 6c 69 6d 69 74 65 64 20 |ts an un|limited |
|00003990| 6e 75 6d 62 65 72 20 6f | 66 20 63 68 61 6e 6e 65 |number o|f channe|
|000039a0| 6c 73 20 6f 6e 20 61 6c | 6c 0d 0a 70 6c 61 74 66 |ls on al|l..platf|
|000039b0| 6f 72 6d 73 2c 20 75 6e | 6c 65 73 73 20 68 61 72 |orms, un|less har|
|000039c0| 64 77 61 72 65 20 6d 69 | 78 69 6e 67 20 69 73 20 |dware mi|xing is |
|000039d0| 75 73 65 64 2e 20 41 6c | 74 68 6f 75 67 68 20 74 |used. Al|though t|
|000039e0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 6f 70 65 |he numbe|r of ope|
|000039f0| 6e 0d 0a 63 68 61 6e 6e | 65 6c 73 20 68 61 73 20 |n..chann|els has |
|00003a00| 73 6f 6d 65 20 69 6d 70 | 61 63 74 20 6f 6e 20 43 |some imp|act on C|
|00003a10| 50 55 20 75 73 61 67 65 | 2c 20 74 68 65 20 61 6d |PU usage|, the am|
|00003a20| 6f 75 6e 74 20 6f 66 20 | 43 50 55 20 70 6f 77 65 |ount of |CPU powe|
|00003a30| 72 20 75 73 65 64 20 64 | 65 70 65 6e 64 73 0d 0a |r used d|epends..|
|00003a40| 6d 6f 73 74 6c 79 20 6f | 6e 20 74 68 65 20 63 68 |mostly o|n the ch|
|00003a50| 61 6e 6e 65 6c 73 20 74 | 68 61 74 20 61 63 74 75 |annels t|hat actu|
|00003a60| 61 6c 6c 79 20 70 6c 61 | 79 20 73 6f 75 6e 64 2e |ally pla|y sound.|
|00003a70| 20 54 68 65 72 65 66 6f | 72 65 20 69 74 20 69 73 | Therefo|re it is|
|00003a80| 20 6d 75 63 68 20 6d 6f | 72 65 0d 0a 69 6d 70 6f | much mo|re..impo|
|00003a90| 72 74 61 6e 74 20 74 6f | 20 65 6e 73 75 72 65 20 |rtant to| ensure |
|00003aa0| 74 68 61 74 20 6e 6f 20 | 75 6e 6e 65 63 65 73 73 |that no |unnecess|
|00003ab0| 61 72 79 20 73 6f 75 6e | 64 73 20 61 72 65 20 6c |ary soun|ds are l|
|00003ac0| 65 66 74 20 70 6c 61 79 | 69 6e 67 20 74 68 61 6e |eft play|ing than|
|00003ad0| 20 69 74 20 69 73 20 74 | 6f 0d 0a 6d 69 6e 69 6d | it is t|o..minim|
|00003ae0| 69 7a 65 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |ize the |number o|
|00003af0| 66 20 6f 70 65 6e 20 63 | 68 61 6e 6e 65 6c 73 2e |f open c|hannels.|
|00003b00| 0d 0a 0d 0a 0d 0a 5c 73 | 65 63 74 69 6f 6e 7b 50 |......\s|ection{P|
|00003b10| 61 6e 6e 69 6e 67 7d 0d | 0a 0d 0a 50 61 6e 6e 69 |anning}.|...Panni|
|00003b20| 6e 67 20 69 6e 20 4d 49 | 44 41 53 20 53 6f 75 6e |ng in MI|DAS Soun|
|00003b30| 64 20 53 79 73 74 65 6d | 20 61 66 66 65 63 74 73 |d System| affects|
|00003b40| 20 74 68 65 20 61 70 70 | 61 72 65 6e 74 20 70 6f | the app|arent po|
|00003b50| 73 69 74 69 6f 6e 20 6f | 66 20 74 68 65 20 73 6f |sition o|f the so|
|00003b60| 75 6e 64 20 69 6e 0d 0a | 73 74 65 72 65 6f 20 65 |und in..|stereo e|
|00003b70| 6e 76 69 72 6f 6e 6d 65 | 6e 74 73 2e 20 53 6f 75 |nvironme|nts. Sou|
|00003b80| 6e 64 20 70 61 6e 6e 65 | 64 20 74 6f 20 60 60 6c |nd panne|d to ``l|
|00003b90| 65 66 74 27 27 20 77 69 | 6c 6c 20 62 65 20 70 6c |eft'' wi|ll be pl|
|00003ba0| 61 79 65 64 20 66 72 6f | 6d 20 74 68 65 20 6c 65 |ayed fro|m the le|
|00003bb0| 66 74 0d 0a 73 70 65 61 | 6b 65 72 2c 20 60 60 72 |ft..spea|ker, ``r|
|00003bc0| 69 67 68 74 27 27 20 66 | 72 6f 6d 20 74 68 65 20 |ight'' f|rom the |
|00003bd0| 72 69 67 68 74 20 6f 6e | 65 20 61 6e 64 20 60 60 |right on|e and ``|
|00003be0| 6d 69 64 64 6c 65 27 27 | 20 66 72 6f 6d 20 62 6f |middle''| from bo|
|00003bf0| 74 68 2e 20 36 34 20 64 | 69 66 66 65 72 65 6e 74 |th. 64 d|ifferent|
|00003c00| 0d 0a 70 61 6e 6e 69 6e | 67 20 70 6f 73 69 74 69 |..pannin|g positi|
|00003c10| 6f 6e 73 20 61 72 65 20 | 61 76 61 69 6c 61 62 6c |ons are |availabl|
|00003c20| 65 20 62 65 74 77 65 65 | 6e 20 60 60 6c 65 66 74 |e betwee|n ``left|
|00003c30| 27 27 20 61 6e 64 20 60 | 60 6d 69 64 64 6c 65 27 |'' and `|`middle'|
|00003c40| 27 20 70 6c 75 73 0d 0a | 60 60 72 69 67 68 74 27 |' plus..|``right'|
|00003c50| 27 20 61 6e 64 20 60 60 | 6d 69 64 64 6c 65 27 27 |' and ``|middle''|
|00003c60| 2c 20 74 6f 20 67 69 76 | 65 20 73 6d 6f 6f 74 68 |, to giv|e smooth|
|00003c70| 20 63 6f 6e 74 72 6f 6c | 20 6f 6e 20 74 68 65 20 | control| on the |
|00003c80| 73 6f 75 6e 64 20 70 6f | 73 69 74 69 6f 6e 2e 0d |sound po|sition..|
|00003c90| 0a 0d 0a 49 6e 20 61 64 | 64 69 74 69 6f 6e 2c 20 |...In ad|dition, |
|00003ca0| 73 75 72 72 6f 75 6e 64 | 20 73 6f 75 6e 64 20 69 |surround| sound i|
|00003cb0| 73 20 61 6c 73 6f 20 63 | 6f 6e 73 69 64 65 72 65 |s also c|onsidere|
|00003cc0| 64 20 61 20 73 65 70 61 | 72 61 74 65 20 70 61 6e |d a sepa|rate pan|
|00003cd0| 6e 69 6e 67 20 70 6f 73 | 69 74 69 6f 6e 2e 0d 0a |ning pos|ition...|
|00003ce0| 53 6f 75 6e 64 73 20 70 | 6c 61 79 65 64 20 77 69 |Sounds p|layed wi|
|00003cf0| 74 68 20 74 68 65 69 72 | 20 70 61 6e 6e 69 6e 67 |th their| panning|
|00003d00| 20 70 6f 73 69 74 69 6f | 6e 20 73 65 74 20 74 6f | positio|n set to|
|00003d10| 20 60 60 73 75 72 72 6f | 75 6e 64 27 27 20 61 72 | ``surro|und'' ar|
|00003d20| 65 20 70 6c 61 79 65 64 | 20 66 72 6f 6d 0d 0a 74 |e played| from..t|
|00003d30| 68 65 20 73 75 72 72 6f | 75 6e 64 20 73 70 65 61 |he surro|und spea|
|00003d40| 6b 65 72 73 20 69 66 20 | 74 68 65 20 63 6f 6d 70 |kers if |the comp|
|00003d50| 75 74 65 72 20 69 73 20 | 63 6f 6e 6e 65 63 74 65 |uter is |connecte|
|00003d60| 64 20 74 6f 20 61 20 73 | 75 72 72 6f 75 6e 64 20 |d to a s|urround |
|00003d70| 64 65 63 6f 64 65 72 2e | 0d 0a 45 76 65 6e 20 69 |decoder.|..Even i|
|00003d80| 66 20 73 75 72 72 6f 75 | 6e 64 20 65 71 75 69 70 |f surrou|nd equip|
|00003d90| 6d 65 6e 74 20 69 73 20 | 6e 6f 74 20 61 76 61 69 |ment is |not avai|
|00003da0| 6c 61 62 6c 65 2c 20 74 | 68 65 20 73 6f 75 6e 64 |lable, t|he sound|
|00003db0| 20 61 70 70 65 61 72 73 | 20 74 6f 20 63 6f 6d 65 | appears| to come|
|00003dc0| 20 66 72 6f 6d 0d 0a 61 | 72 6f 75 6e 64 20 74 68 | from..a|round th|
|00003dd0| 65 20 6c 69 73 74 65 6e | 65 72 27 73 20 68 65 61 |e listen|er's hea|
|00003de0| 64 2c 20 6e 6f 74 20 66 | 72 6f 6d 20 69 6e 73 69 |d, not f|rom insi|
|00003df0| 64 65 20 69 74 20 61 73 | 20 69 6e 20 60 60 6d 69 |de it as| in ``mi|
|00003e00| 64 64 6c 65 27 27 20 70 | 61 6e 6e 69 6e 67 0d 0a |ddle'' p|anning..|
|00003e10| 70 6f 73 69 74 69 6f 6e | 2e 0d 0a 0d 0a 4e 6f 74 |position|.....Not|
|00003e20| 65 20 74 68 61 74 20 6e | 6f 74 20 61 6c 6c 20 53 |e that n|ot all S|
|00003e30| 6f 75 6e 64 20 44 65 76 | 69 63 65 73 20 6e 65 63 |ound Dev|ices nec|
|00003e40| 65 73 73 61 72 69 6c 79 | 20 73 75 70 70 6f 72 74 |essarily| support|
|00003e50| 20 73 75 72 72 6f 75 6e | 64 20 73 6f 75 6e 64 2e | surroun|d sound.|
|00003e60| 0d 0a 46 75 72 74 68 65 | 72 6d 6f 72 65 2c 20 69 |..Furthe|rmore, i|
|00003e70| 66 20 74 68 65 20 63 6f | 6d 70 75 74 65 72 20 69 |f the co|mputer i|
|00003e80| 73 20 70 6c 61 79 69 6e | 67 20 69 6e 20 73 74 65 |s playin|g in ste|
|00003e90| 72 65 6f 20 6d 6f 64 65 | 2c 20 62 75 74 20 63 6f |reo mode|, but co|
|00003ea0| 6e 6e 65 63 74 65 64 20 | 74 6f 20 6d 6f 6e 6f 0d |nnected |to mono.|
|00003eb0| 0a 65 71 75 69 70 6d 65 | 6e 74 2c 20 61 6c 6c 20 |.equipme|nt, all |
|00003ec0| 73 6f 75 6e 64 73 20 70 | 6c 61 79 65 64 20 69 6e |sounds p|layed in|
|00003ed0| 20 60 60 73 75 72 72 6f | 75 6e 64 27 27 20 77 69 | ``surro|und'' wi|
|00003ee0| 6c 6c 20 64 69 73 61 70 | 70 65 61 72 21 0d 0a 0d |ll disap|pear!...|
|00003ef0| 0a 0d 0a 5c 73 65 63 74 | 69 6f 6e 7b 53 6f 66 74 |...\sect|ion{Soft|
|00003f00| 77 61 72 65 20 61 6e 64 | 20 68 61 72 64 77 61 72 |ware and| hardwar|
|00003f10| 65 20 6d 69 78 69 6e 67 | 7d 0d 0a 0d 0a 4d 6f 73 |e mixing|}....Mos|
|00003f20| 74 20 73 6f 75 6e 64 20 | 63 61 72 64 73 20 73 75 |t sound |cards su|
|00003f30| 70 70 6f 72 74 65 64 20 | 62 79 20 4d 49 44 41 53 |pported |by MIDAS|
|00003f40| 20 53 6f 75 6e 64 20 53 | 79 73 74 65 6d 20 61 72 | Sound S|ystem ar|
|00003f50| 65 20 6f 6e 6c 79 20 63 | 61 70 61 62 6c 65 20 6f |e only c|apable o|
|00003f60| 66 20 70 6c 61 79 69 6e | 67 0d 0a 6f 6e 65 20 64 |f playin|g..one d|
|00003f70| 69 67 69 74 61 6c 20 73 | 6f 75 6e 64 20 63 68 61 |igital s|ound cha|
|00003f80| 6e 6e 65 6c 20 61 74 20 | 61 20 74 69 6d 65 2c 20 |nnel at |a time, |
|00003f90| 62 75 74 20 73 74 69 6c | 6c 20 4d 49 44 41 53 20 |but stil|l MIDAS |
|00003fa0| 73 75 70 70 6f 72 74 73 | 20 61 6e 20 75 6e 6c 69 |supports| an unli|
|00003fb0| 6d 69 74 65 64 0d 0a 6e | 75 6d 62 65 72 20 6f 66 |mited..n|umber of|
|00003fc0| 20 63 68 61 6e 6e 65 6c | 73 20 77 69 74 68 20 74 | channel|s with t|
|00003fd0| 68 65 6d 2e 20 54 68 69 | 73 20 69 73 20 61 63 63 |hem. Thi|s is acc|
|00003fe0| 6f 6d 70 6c 69 73 68 65 | 64 20 74 68 72 6f 75 67 |omplishe|d throug|
|00003ff0| 68 20 73 6f 66 74 77 61 | 72 65 20 6d 69 78 69 6e |h softwa|re mixin|
|00004000| 67 20 6f 66 0d 0a 74 68 | 65 20 73 6f 75 6e 64 20 |g of..th|e sound |
|00004010| 2d 2d 2d 20 74 68 65 20 | 73 6f 75 6e 64 20 63 68 |--- the |sound ch|
|00004020| 61 6e 6e 65 6c 73 20 61 | 72 65 20 6d 69 78 65 64 |annels a|re mixed|
|00004030| 20 64 69 67 69 74 61 6c | 6c 79 20 74 6f 67 65 74 | digital|ly toget|
|00004040| 68 65 72 20 62 65 66 6f | 72 65 20 70 61 73 73 69 |her befo|re passi|
|00004050| 6e 67 0d 0a 74 68 65 20 | 73 6f 75 6e 64 20 74 6f |ng..the |sound to|
|00004060| 20 74 68 65 20 73 6f 75 | 6e 64 20 63 61 72 64 2e | the sou|nd card.|
|00004070| 0d 0a 0d 0a 4d 69 78 69 | 6e 67 20 74 68 65 20 73 |....Mixi|ng the s|
|00004080| 6f 75 6e 64 20 69 6e 20 | 73 6f 66 74 77 61 72 65 |ound in |software|
|00004090| 20 69 73 20 61 20 63 6f | 6d 70 6c 69 63 61 74 65 | is a co|mplicate|
|000040a0| 64 20 70 72 6f 63 65 73 | 73 2c 20 61 6e 64 2c 20 |d proces|s, and, |
|000040b0| 61 6c 74 68 6f 75 67 68 | 20 4d 49 44 41 53 0d 0a |although| MIDAS..|
|000040c0| 6d 69 78 69 6e 67 20 72 | 6f 75 74 69 6e 65 73 20 |mixing r|outines |
|000040d0| 61 72 65 20 63 61 72 65 | 66 75 6c 6c 79 20 6f 70 |are care|fully op|
|000040e0| 74 69 6d 69 7a 65 64 2c | 20 63 61 6e 20 73 74 69 |timized,| can sti|
|000040f0| 6c 6c 20 74 61 6b 65 20 | 61 20 63 6f 6e 73 69 64 |ll take |a consid|
|00004100| 65 72 61 62 6c 65 20 61 | 6d 6f 75 6e 74 0d 0a 6f |erable a|mount..o|
|00004110| 66 20 43 50 55 20 74 69 | 6d 65 2e 20 54 68 65 20 |f CPU ti|me. The |
|00004120| 43 50 55 20 74 69 6d 65 | 20 75 73 65 64 20 69 73 |CPU time| used is|
|00004130| 20 64 65 74 65 72 6d 69 | 6e 65 64 20 62 79 20 66 | determi|ned by f|
|00004140| 6f 75 72 20 66 61 63 74 | 6f 72 73 3a 20 54 68 65 |our fact|ors: The|
|00004150| 20 6e 75 6d 62 65 72 20 | 6f 66 0d 0a 63 68 61 6e | number |of..chan|
|00004160| 6e 65 6c 73 20 61 63 74 | 69 76 65 2c 20 74 68 65 |nels act|ive, the|
|00004170| 20 6d 69 78 69 6e 67 20 | 72 61 74 65 2c 20 74 68 | mixing |rate, th|
|00004180| 65 20 6f 75 74 70 75 74 | 20 6d 6f 64 65 20 61 6e |e output| mode an|
|00004190| 64 20 74 68 65 20 74 79 | 70 65 20 6f 66 20 74 68 |d the ty|pe of th|
|000041a0| 65 20 73 61 6d 70 6c 65 | 73 0d 0a 70 6c 61 79 65 |e sample|s..playe|
|000041b0| 64 2e 20 54 68 65 20 74 | 69 6d 65 20 75 73 65 64 |d. The t|ime used|
|000041c0| 20 64 65 70 65 6e 64 73 | 20 61 6c 6d 6f 73 74 20 | depends| almost |
|000041d0| 6c 69 6e 65 61 72 6c 79 | 20 6f 6e 20 74 68 65 20 |linearly| on the |
|000041e0| 6d 69 78 69 6e 67 20 72 | 61 74 65 20 61 6e 64 20 |mixing r|ate and |
|000041f0| 74 68 65 0d 0a 6e 75 6d | 62 65 72 20 6f 66 20 63 |the..num|ber of c|
|00004200| 68 61 6e 6e 65 6c 73 2c | 20 61 6e 64 20 73 74 65 |hannels,| and ste|
|00004210| 72 65 6f 20 6f 75 74 70 | 75 74 20 63 61 6e 20 74 |reo outp|ut can t|
|00004220| 61 6b 65 20 75 70 20 74 | 6f 20 35 30 5c 25 7b 7d |ake up t|o 50\%{}|
|00004230| 20 6d 6f 72 65 20 43 50 | 55 20 74 69 6d 65 0d 0a | more CP|U time..|
|00004240| 74 68 61 6e 20 6d 6f 6e | 6f 2e 20 54 68 65 20 73 |than mon|o. The s|
|00004250| 61 6d 70 6c 65 20 74 79 | 70 65 20 65 66 66 65 63 |ample ty|pe effec|
|00004260| 74 20 69 73 20 61 6c 6d | 6f 73 74 20 74 68 65 20 |t is alm|ost the |
|00004270| 73 61 6d 65 20 2d 20 73 | 74 65 72 65 6f 20 73 61 |same - s|tereo sa|
|00004280| 6d 70 6c 65 73 20 63 61 | 6e 0d 0a 74 61 6b 65 20 |mples ca|n..take |
|00004290| 75 70 20 74 6f 20 35 30 | 5c 25 7b 7d 20 6d 6f 72 |up to 50|\%{} mor|
|000042a0| 65 20 43 50 55 20 74 68 | 61 6e 20 6d 6f 6e 6f 20 |e CPU th|an mono |
|000042b0| 6f 6e 65 73 2c 20 61 6e | 64 20 31 36 2d 62 69 74 |ones, an|d 16-bit|
|000042c0| 20 73 61 6d 70 6c 65 73 | 20 35 30 5c 25 7b 7d 20 | samples| 50\%{} |
|000042d0| 6d 6f 72 65 0d 0a 74 68 | 61 6e 20 38 2d 62 69 74 |more..th|an 8-bit|
|000042e0| 2e 0d 0a 0d 0a 54 68 65 | 20 6f 70 70 6f 73 69 74 |.....The| opposit|
|000042f0| 65 20 6f 66 20 73 6f 66 | 74 77 61 72 65 20 6d 69 |e of sof|tware mi|
|00004300| 78 69 6e 67 20 69 73 20 | 68 61 72 64 77 61 72 65 |xing is |hardware|
|00004310| 20 6d 69 78 69 6e 67 2e | 20 48 61 72 64 77 61 72 | mixing.| Hardwar|
|00004320| 65 20 6d 69 78 69 6e 67 | 20 73 6f 75 6e 64 0d 0a |e mixing| sound..|
|00004330| 63 61 72 64 73 20 61 72 | 65 20 63 61 70 61 62 6c |cards ar|e capabl|
|00004340| 65 20 6f 66 20 70 6c 61 | 79 69 6e 67 20 6d 75 6c |e of pla|ying mul|
|00004350| 74 69 70 6c 65 20 64 69 | 67 69 74 61 6c 20 73 6f |tiple di|gital so|
|00004360| 75 6e 64 73 20 69 6e 20 | 68 61 72 64 77 61 72 65 |unds in |hardware|
|00004370| 2c 20 61 6e 64 20 74 68 | 75 73 0d 0a 74 68 65 72 |, and th|us..ther|
|00004380| 65 20 69 73 20 6e 6f 20 | 6e 65 65 64 20 74 6f 20 |e is no |need to |
|00004390| 6d 69 78 20 74 68 65 20 | 73 6f 75 6e 64 20 69 6e |mix the |sound in|
|000043a0| 20 73 6f 66 74 77 61 72 | 65 2e 20 54 68 69 73 20 | softwar|e. This |
|000043b0| 6f 66 74 65 6e 20 75 73 | 65 73 20 6d 75 63 68 20 |often us|es much |
|000043c0| 6c 65 73 73 20 43 50 55 | 0d 0a 70 6f 77 65 72 2c |less CPU|..power,|
|000043d0| 20 64 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 74 68 | dependi|ng on th|
|000043e0| 65 20 73 6f 75 6e 64 20 | 63 61 72 64 2c 20 62 75 |e sound |card, bu|
|000043f0| 74 20 61 73 20 61 20 74 | 72 61 64 65 6f 66 66 20 |t as a t|radeoff |
|00004400| 73 6f 6d 65 20 66 6c 65 | 78 69 62 69 6c 69 74 79 |some fle|xibility|
|00004410| 20 69 73 0d 0a 6c 6f 73 | 74 2e 20 4f 6e 65 20 70 | is..los|t. One p|
|00004420| 72 6f 62 6c 65 6d 20 77 | 69 74 68 20 68 61 72 64 |roblem w|ith hard|
|00004430| 77 61 72 65 20 6d 69 78 | 69 6e 67 20 63 61 72 64 |ware mix|ing card|
|00004440| 73 20 69 73 2c 20 74 68 | 61 74 20 73 61 6d 70 6c |s is, th|at sampl|
|00004450| 65 73 20 68 61 76 65 20 | 74 6f 20 62 65 0d 0a 70 |es have |to be..p|
|00004460| 6c 61 63 65 64 20 69 6e | 20 6f 6e 2d 63 61 72 64 |laced in| on-card|
|00004470| 20 6d 65 6d 6f 72 79 2e | 20 56 65 72 79 20 6f 66 | memory.| Very of|
|00004480| 74 65 6e 20 74 68 65 20 | 63 61 72 64 73 20 63 6f |ten the |cards co|
|00004490| 6d 65 20 77 69 74 68 20 | 61 73 20 6c 69 74 74 6c |me with |as littl|
|000044a0| 65 20 61 73 20 35 31 32 | 6b 62 0d 0a 6f 66 20 6d |e as 512|kb..of m|
|000044b0| 65 6d 6f 72 79 2c 20 61 | 6e 64 20 74 68 75 73 20 |emory, a|nd thus |
|000044c0| 63 61 6e 20 73 74 6f 72 | 65 20 6f 6e 6c 79 20 61 |can stor|e only a|
|000044d0| 20 66 65 77 20 73 61 6d | 70 6c 65 73 2e 20 54 68 | few sam|ples. Th|
|000044e0| 65 20 73 65 63 6f 6e 64 | 20 70 72 6f 62 6c 65 6d |e second| problem|
|000044f0| 20 69 73 2c 20 74 68 61 | 74 0d 0a 70 6c 61 79 69 | is, tha|t..playi|
|00004500| 6e 67 20 73 74 72 65 61 | 6d 73 20 77 69 74 68 20 |ng strea|ms with |
|00004510| 68 61 72 64 77 61 72 65 | 20 6d 69 78 69 6e 67 20 |hardware| mixing |
|00004520| 63 61 72 64 73 20 69 73 | 20 75 73 75 61 6c 6c 79 |cards is| usually|
|00004530| 20 69 6d 70 6f 73 73 69 | 62 6c 65 2e 20 54 68 69 | impossi|ble. Thi|
|00004540| 73 0d 0a 73 65 76 65 72 | 65 6c 79 20 6c 69 6d 69 |s..sever|ely limi|
|00004550| 74 73 20 74 68 65 20 75 | 73 61 62 69 6c 69 74 79 |ts the u|sability|
|00004560| 20 6f 66 20 68 61 72 64 | 77 61 72 65 20 6d 69 78 | of hard|ware mix|
|00004570| 69 6e 67 20 63 61 72 64 | 73 20 77 69 74 68 20 4d |ing card|s with M|
|00004580| 49 44 41 53 2e 0d 0a 0d | 0a 0d 0a 0d 0a 0d 0a 0d |IDAS....|........|
|00004590| 0a 0d 0a 0d 0a 5c 63 68 | 61 70 74 65 72 7b 54 68 |.....\ch|apter{Th|
|000045a0| 65 20 73 79 73 74 65 6d | 7d 0d 0a 0d 0a 54 68 69 |e system|}....Thi|
|000045b0| 73 20 63 68 61 70 74 65 | 72 20 67 69 76 65 73 20 |s chapte|r gives |
|000045c0| 61 6e 20 6f 76 65 72 76 | 69 65 77 20 6f 6e 20 68 |an overv|iew on h|
|000045d0| 6f 77 20 4d 49 44 41 53 | 20 53 6f 75 6e 64 20 53 |ow MIDAS| Sound S|
|000045e0| 79 73 74 65 6d 20 69 73 | 20 61 63 74 75 61 6c 6c |ystem is| actuall|
|000045f0| 79 20 62 75 69 6c 74 2e | 0d 0a 49 74 20 67 69 76 |y built.|..It giv|
|00004600| 65 73 20 64 65 73 63 72 | 69 70 74 69 6f 6e 73 20 |es descr|iptions |
|00004610| 6f 6e 20 61 6c 6c 20 6d | 61 69 6e 20 73 79 73 74 |on all m|ain syst|
|00004620| 65 6d 20 6d 6f 64 75 6c | 65 73 2c 20 69 6e 66 6f |em modul|es, info|
|00004630| 72 6d 61 74 69 6f 6e 20 | 6f 6e 20 68 6f 77 20 74 |rmation |on how t|
|00004640| 68 65 79 20 75 73 65 0d | 0a 65 61 63 68 20 6f 74 |hey use.|.each ot|
|00004650| 68 65 72 2c 20 61 6e 64 | 20 77 68 61 74 20 74 68 |her, and| what th|
|00004660| 65 69 72 20 6d 6f 73 74 | 20 69 6d 70 6f 72 74 61 |eir most| importa|
|00004670| 6e 74 20 63 68 61 72 61 | 63 74 65 72 69 73 74 69 |nt chara|cteristi|
|00004680| 63 73 20 61 72 65 2e 20 | 54 68 69 73 0d 0a 69 6e |cs are. |This..in|
|00004690| 66 6f 72 6d 61 74 69 6f | 6e 20 6d 61 69 6e 6c 79 |formatio|n mainly|
|000046a0| 20 61 70 70 6c 69 65 73 | 20 66 6f 72 20 4d 49 44 | applies| for MID|
|000046b0| 41 53 20 75 73 61 67 65 | 20 62 65 6c 6f 77 20 74 |AS usage| below t|
|000046c0| 68 65 20 41 50 49 20 6c | 65 76 65 6c 2c 20 61 6e |he API l|evel, an|
|000046d0| 64 20 6d 6f 73 74 0d 0a | 75 73 65 72 73 20 64 6f |d most..|users do|
|000046e0| 20 6e 6f 74 20 6e 65 65 | 64 20 74 6f 20 62 65 20 | not nee|d to be |
|000046f0| 66 61 6d 69 6c 69 61 72 | 20 77 69 74 68 20 74 68 |familiar| with th|
|00004700| 69 73 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2e 0d |is infor|mation..|
|00004710| 0a 0d 0a 0d 0a 5c 73 65 | 63 74 69 6f 6e 7b 4f 76 |.....\se|ction{Ov|
|00004720| 65 72 76 69 65 77 20 6f | 66 20 73 79 73 74 65 6d |erview o|f system|
|00004730| 20 61 72 63 68 69 74 65 | 63 68 74 75 72 65 7d 0d | archite|chture}.|
|00004740| 0a 0d 0a 5b 54 42 44 3a | 20 70 69 63 74 75 72 65 |...[TBD:| picture|
|00004750| 21 5d 0d 0a 0d 0a 0d 0a | 5c 73 65 63 74 69 6f 6e |!]......|\section|
|00004760| 7b 44 65 73 63 72 69 70 | 74 69 6f 6e 20 6f 66 20 |{Descrip|tion of |
|00004770| 61 6c 6c 20 6d 6f 64 75 | 6c 65 73 7d 0d 0a 0d 0a |all modu|les}....|
|00004780| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 53 6f 75 6e |\subsect|ion{Soun|
|00004790| 64 20 44 65 76 69 63 65 | 73 7d 0d 0a 0d 0a 53 6f |d Device|s}....So|
|000047a0| 75 6e 64 20 44 65 76 69 | 63 65 73 20 61 72 65 20 |und Devi|ces are |
|000047b0| 61 74 20 74 68 65 20 76 | 65 72 79 20 68 65 61 72 |at the v|ery hear|
|000047c0| 74 20 6f 66 20 4d 49 44 | 41 53 2e 20 54 68 65 79 |t of MID|AS. They|
|000047d0| 20 70 72 6f 76 69 64 65 | 20 74 68 65 20 62 61 73 | provide| the bas|
|000047e0| 69 63 0d 0a 66 75 6e 63 | 74 69 6f 6e 61 6c 69 74 |ic..func|tionalit|
|000047f0| 79 20 66 6f 72 20 70 6c | 61 79 69 6e 67 20 61 75 |y for pl|aying au|
|00004800| 64 69 6f 2c 20 74 68 65 | 79 20 6d 61 6e 61 67 65 |dio, the|y manage|
|00004810| 20 74 68 65 20 73 61 6d | 70 6c 65 73 20 6c 6f 61 | the sam|ples loa|
|00004820| 64 65 64 20 69 6e 20 74 | 68 65 0d 0a 73 79 73 74 |ded in t|he..syst|
|00004830| 65 6d 2c 20 61 6e 64 20 | 70 72 6f 76 69 64 65 20 |em, and |provide |
|00004840| 61 20 63 6f 6d 6d 6f 6e | 20 70 72 6f 67 72 61 6d |a common| program|
|00004850| 6d 69 6e 67 20 69 6e 74 | 65 72 66 61 63 65 20 66 |ming int|erface f|
|00004860| 6f 72 20 61 6c 6c 20 73 | 75 70 70 6f 72 74 65 64 |or all s|upported|
|00004870| 20 73 6f 75 6e 64 0d 0a | 68 61 72 64 77 61 72 65 | sound..|hardware|
|00004880| 2e 20 4e 6f 72 6d 61 6c | 6c 79 20 61 20 75 73 65 |. Normal|ly a use|
|00004890| 72 20 64 6f 65 73 20 6e | 6f 74 20 75 73 65 20 74 |r does n|ot use t|
|000048a0| 68 65 20 53 6f 75 6e 64 | 20 44 65 76 69 63 65 73 |he Sound| Devices|
|000048b0| 20 64 69 72 65 63 74 6c | 79 2c 20 62 75 74 20 72 | directl|y, but r|
|000048c0| 61 74 68 65 72 0d 0a 75 | 73 65 73 20 4d 49 44 41 |ather..u|ses MIDA|
|000048d0| 53 20 75 70 70 65 72 20 | 6c 65 76 65 6c 20 70 72 |S upper |level pr|
|000048e0| 6f 67 72 61 6d 6d 69 6e | 67 20 69 6e 74 65 72 66 |ogrammin|g interf|
|000048f0| 61 63 65 73 20 61 6e 64 | 20 6c 69 62 72 61 72 69 |aces and| librari|
|00004900| 65 73 20 74 6f 20 70 6c | 61 79 20 73 6f 75 6e 64 |es to pl|ay sound|
|00004910| 2e 0d 0a 48 6f 77 65 76 | 65 72 2c 20 69 6e 74 65 |...Howev|er, inte|
|00004920| 72 6e 61 6c 6c 79 20 4d | 49 44 41 53 20 69 73 20 |rnally M|IDAS is |
|00004930| 76 65 72 79 20 6d 75 63 | 68 20 63 65 6e 74 65 72 |very muc|h center|
|00004940| 65 64 20 61 72 6f 75 6e | 64 20 53 6f 75 6e 64 20 |ed aroun|d Sound |
|00004950| 44 65 76 69 63 65 73 2c | 20 61 6e 64 0d 0a 61 6e |Devices,| and..an|
|00004960| 79 6f 6e 65 20 64 6f 69 | 6e 67 20 61 6e 79 20 6c |yone doi|ng any l|
|00004970| 6f 77 65 72 2d 6c 65 76 | 65 6c 20 4d 49 44 41 53 |ower-lev|el MIDAS|
|00004980| 20 70 72 6f 67 72 61 6d | 6d 69 6e 67 20 6f 72 20 | program|ming or |
|00004990| 6a 75 73 74 20 65 78 61 | 6d 69 6e 69 6e 67 20 74 |just exa|mining t|
|000049a0| 68 65 20 73 79 73 74 65 | 6d 0d 0a 73 6f 75 72 63 |he syste|m..sourc|
|000049b0| 65 20 63 6f 64 65 20 63 | 61 6e 27 74 20 61 76 6f |e code c|an't avo|
|000049c0| 69 64 20 77 6f 72 6b 69 | 6e 67 20 77 69 74 68 20 |id worki|ng with |
|000049d0| 74 68 65 6d 2e 0d 0a 0d | 0a 41 20 73 69 6e 67 6c |them....|.A singl|
|000049e0| 65 20 53 6f 75 6e 64 20 | 44 65 76 69 63 65 20 63 |e Sound |Device c|
|000049f0| 61 6e 20 63 6f 6e 74 61 | 69 6e 20 69 6e 66 6f 72 |an conta|in infor|
|00004a00| 6d 61 74 69 6f 6e 20 66 | 6f 72 20 6f 6e 65 20 6f |mation f|or one o|
|00004a10| 72 20 6d 6f 72 65 20 73 | 6f 75 6e 64 20 63 61 72 |r more s|ound car|
|00004a20| 64 2e 20 49 6e 0d 0a 74 | 68 61 74 20 63 61 73 65 |d. In..t|hat case|
|00004a30| 20 74 68 65 20 63 61 72 | 64 73 20 61 72 65 20 75 | the car|ds are u|
|00004a40| 73 75 61 6c 6c 79 20 64 | 69 66 66 65 72 65 6e 74 |sually d|ifferent|
|00004a50| 20 6d 6f 64 65 6c 73 20 | 6f 66 20 74 68 65 20 73 | models |of the s|
|00004a60| 61 6d 65 20 73 6f 75 6e | 64 20 63 61 72 64 20 2d |ame soun|d card -|
|00004a70| 20 66 6f 72 0d 0a 65 78 | 61 6d 70 6c 65 2c 20 74 | for..ex|ample, t|
|00004a80| 68 65 20 53 6f 75 6e 64 | 20 42 6c 61 73 74 65 72 |he Sound| Blaster|
|00004a90| 20 73 65 72 69 65 73 20 | 53 6f 75 6e 64 20 44 65 | series |Sound De|
|00004aa0| 76 69 63 65 20 69 6e 63 | 6c 75 64 65 73 20 66 69 |vice inc|ludes fi|
|00004ab0| 76 65 20 64 69 66 66 65 | 72 65 6e 74 20 73 6f 75 |ve diffe|rent sou|
|00004ac0| 6e 64 0d 0a 63 61 72 64 | 20 74 79 70 65 73 3a 20 |nd..card| types: |
|00004ad0| 53 6f 75 6e 64 20 42 6c | 61 73 74 65 72 20 31 2e |Sound Bl|aster 1.|
|00004ae0| 30 2c 20 31 2e 35 2c 20 | 32 2e 30 2c 20 50 72 6f |0, 1.5, |2.0, Pro|
|00004af0| 20 61 6e 64 20 31 36 2e | 0d 0a 0d 0a 49 6e 74 65 | and 16.|....Inte|
|00004b00| 72 6e 61 6c 6c 79 2c 20 | 61 20 53 6f 75 6e 64 20 |rnally, |a Sound |
|00004b10| 44 65 76 69 63 65 20 69 | 73 20 72 65 70 72 65 73 |Device i|s repres|
|00004b20| 65 6e 74 65 64 20 62 79 | 20 6f 6e 65 20 6c 61 72 |ented by| one lar|
|00004b30| 67 65 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |ge data |structur|
|00004b40| 65 2e 20 54 68 65 0d 0a | 73 74 72 75 63 74 75 72 |e. The..|structur|
|00004b50| 65 20 63 6f 6e 74 61 69 | 6e 73 20 61 20 73 65 74 |e contai|ns a set|
|00004b60| 20 6f 66 20 76 61 72 69 | 61 62 6c 65 73 20 66 6f | of vari|ables fo|
|00004b70| 72 20 63 6f 6e 66 69 67 | 75 72 69 6e 67 20 74 68 |r config|uring th|
|00004b80| 65 20 53 6f 75 6e 64 20 | 44 65 76 69 63 65 2c 20 |e Sound |Device, |
|00004b90| 70 6c 75 73 0d 0a 61 20 | 6e 75 6d 62 65 72 20 6f |plus..a |number o|
|00004ba0| 66 20 66 75 6e 63 74 69 | 6f 6e 20 70 6f 69 6e 74 |f functi|on point|
|00004bb0| 65 72 73 2e 20 54 68 65 | 73 65 20 66 75 6e 63 74 |ers. The|se funct|
|00004bc0| 69 6f 6e 20 70 6f 69 6e | 74 65 72 73 20 61 72 65 |ion poin|ters are|
|00004bd0| 20 74 68 65 6e 20 75 73 | 65 64 20 74 6f 0d 0a 63 | then us|ed to..c|
|00004be0| 61 6c 6c 20 74 68 65 20 | 53 6f 75 6e 64 20 44 65 |all the |Sound De|
|00004bf0| 76 69 63 65 20 66 75 6e | 63 74 69 6f 6e 73 2e 20 |vice fun|ctions. |
|00004c00| 54 68 69 73 20 65 6e 73 | 75 72 65 73 20 74 68 61 |This ens|ures tha|
|00004c10| 74 20 61 6e 79 20 63 6f | 64 65 20 77 6f 72 6b 69 |t any co|de worki|
|00004c20| 6e 67 20 77 69 74 68 0d | 0a 4d 49 44 41 53 20 53 |ng with.|.MIDAS S|
|00004c30| 6f 75 6e 64 20 44 65 76 | 69 63 65 73 20 6f 6e 6c |ound Dev|ices onl|
|00004c40| 79 20 68 61 73 20 74 6f | 20 6d 61 69 6e 74 61 69 |y has to| maintai|
|00004c50| 6e 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 |n a poin|ter to t|
|00004c60| 68 65 20 63 75 72 72 65 | 6e 74 20 53 6f 75 6e 64 |he curre|nt Sound|
|00004c70| 0d 0a 44 65 76 69 63 65 | 20 73 74 72 75 63 74 75 |..Device| structu|
|00004c80| 72 65 20 69 6e 20 75 73 | 65 2c 20 61 6e 64 20 63 |re in us|e, and c|
|00004c90| 61 6e 20 75 73 65 20 61 | 6e 79 20 73 75 70 70 6f |an use a|ny suppo|
|00004ca0| 72 74 65 64 20 53 6f 75 | 6e 64 20 44 65 76 69 63 |rted Sou|nd Devic|
|00004cb0| 65 20 77 69 74 68 6f 75 | 74 20 63 6f 64 65 0d 0a |e withou|t code..|
|00004cc0| 6d 6f 64 69 66 69 63 61 | 74 69 6f 6e 2e 0d 0a 0d |modifica|tion....|
|00004cd0| 0a 0d 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 47 |...\subs|ection{G|
|00004ce0| 65 6e 65 72 69 63 20 4d | 6f 64 75 6c 65 20 50 6c |eneric M|odule Pl|
|00004cf0| 61 79 65 72 7d 0d 0a 0d | 0a 47 65 6e 65 72 69 63 |ayer}...|.Generic|
|00004d00| 20 4d 6f 64 75 6c 65 20 | 50 6c 61 79 65 72 2c 20 | Module |Player, |
|00004d10| 6f 72 20 47 4d 50 6c 61 | 79 65 72 20 66 6f 72 20 |or GMPla|yer for |
|00004d20| 73 68 6f 72 74 2c 20 74 | 61 6b 65 73 20 63 61 72 |short, t|akes car|
|00004d30| 65 20 6f 66 20 61 6c 6c | 20 6d 6f 64 75 6c 65 0d |e of all| module.|
|00004d40| 0a 70 6c 61 79 69 6e 67 | 20 69 6e 20 4d 49 44 41 |.playing| in MIDA|
|00004d50| 53 2e 20 4d 6f 64 75 6c | 65 73 20 69 6e 20 64 69 |S. Modul|es in di|
|00004d60| 66 66 65 72 65 6e 74 20 | 66 6f 72 6d 61 74 73 20 |fferent |formats |
|00004d70| 61 72 65 20 63 6f 6e 76 | 65 72 74 65 64 20 74 6f |are conv|erted to|
|00004d80| 20 47 4d 50 6c 61 79 65 | 72 0d 0a 69 6e 74 65 72 | GMPlaye|r..inter|
|00004d90| 6e 61 6c 20 7b 5c 65 6d | 20 67 6d 70 4d 6f 64 75 |nal {\em| gmpModu|
|00004da0| 6c 65 7d 20 20 20 20 20 | 20 20 20 25 20 54 4f 44 |le} | % TOD|
|00004db0| 4f 20 2d 20 6c 69 6e 6b | 0d 0a 73 74 72 75 63 74 |O - link|..struct|
|00004dc0| 75 72 65 20 66 6f 72 6d | 61 74 20 77 68 65 6e 20 |ure form|at when |
|00004dd0| 6c 6f 61 64 65 64 20 74 | 6f 20 6d 65 6d 6f 72 79 |loaded t|o memory|
|00004de0| 2c 0d 0a 73 6f 20 74 68 | 61 74 20 61 20 73 69 6e |,..so th|at a sin|
|00004df0| 67 6c 65 20 6d 6f 64 75 | 6c 65 20 70 6c 61 79 65 |gle modu|le playe|
|00004e00| 72 20 63 61 6e 20 68 61 | 6e 64 6c 65 20 61 6c 6c |r can ha|ndle all|
|00004e10| 20 66 6f 72 6d 61 74 73 | 2e 20 54 6f 20 6d 61 69 | formats|. To mai|
|00004e20| 6e 74 61 69 6e 20 62 65 | 73 74 0d 0a 70 6f 73 73 |ntain be|st..poss|
|00004e30| 69 62 6c 65 20 63 6f 6d | 70 61 74 69 62 69 6c 69 |ible com|patibili|
|00004e40| 74 79 20 77 69 74 68 20 | 61 6c 6c 20 74 72 61 63 |ty with |all trac|
|00004e50| 6b 65 72 73 2c 20 68 6f | 77 65 76 65 72 2c 20 47 |kers, ho|wever, G|
|00004e60| 4d 50 6c 61 79 65 72 20 | 69 6d 70 6c 65 6d 65 6e |MPlayer |implemen|
|00004e70| 74 73 20 73 6f 6d 65 0d | 0a 63 6f 6d 6d 61 6e 64 |ts some.|.command|
|00004e80| 73 20 61 6e 64 20 66 65 | 61 74 75 72 65 73 20 64 |s and fe|atures d|
|00004e90| 69 66 66 65 72 65 6e 74 | 6c 79 20 64 65 70 65 6e |ifferent|ly depen|
|00004ea0| 64 69 6e 67 20 6f 6e 20 | 74 68 65 20 6f 72 69 67 |ding on |the orig|
|00004eb0| 69 6e 61 6c 20 6d 6f 64 | 75 6c 65 20 66 6f 72 6d |inal mod|ule form|
|00004ec0| 61 74 2e 0d 0a 54 68 69 | 73 20 65 6e 73 75 72 65 |at...Thi|s ensure|
|00004ed0| 73 20 74 68 61 74 20 70 | 6c 61 79 62 61 63 6b 20 |s that p|layback |
|00004ee0| 71 75 61 6c 69 74 79 20 | 69 73 20 6e 6f 74 20 63 |quality |is not c|
|00004ef0| 6f 6d 70 72 6f 6d 69 73 | 65 64 2e 0d 0a 0d 0a 47 |ompromis|ed.....G|
|00004f00| 4d 50 6c 61 79 65 72 20 | 69 73 20 6e 6f 74 20 6c |MPlayer |is not l|
|00004f10| 69 6d 69 74 65 64 20 66 | 6f 72 20 70 6c 61 79 69 |imited f|or playi|
|00004f20| 6e 67 20 61 20 73 69 6e | 67 6c 65 20 6d 6f 64 75 |ng a sin|gle modu|
|00004f30| 6c 65 20 6f 6e 6c 79 2c | 20 69 6e 20 66 61 63 74 |le only,| in fact|
|00004f40| 20 69 74 20 63 61 6e 20 | 62 65 0d 0a 75 73 65 64 | it can |be..used|
|00004f50| 20 74 6f 20 70 6c 61 79 | 20 61 6e 20 75 6e 6c 69 | to play| an unli|
|00004f60| 6d 69 74 65 64 20 6e 75 | 6d 62 65 72 20 6f 66 20 |mited nu|mber of |
|00004f70| 73 6f 6e 67 73 20 73 69 | 6d 75 6c 74 61 6e 65 6f |songs si|multaneo|
|00004f80| 75 73 6c 79 2e 20 54 68 | 69 73 20 77 61 79 20 73 |usly. Th|is way s|
|00004f90| 6f 75 6e 64 0d 0a 65 66 | 66 65 63 74 73 20 63 61 |ound..ef|fects ca|
|00004fa0| 6e 20 62 65 20 63 6f 6d | 70 6f 73 65 64 20 61 73 |n be com|posed as|
|00004fb0| 20 73 6d 61 6c 6c 20 73 | 6f 6e 67 20 66 72 61 67 | small s|ong frag|
|00004fc0| 6d 65 6e 74 73 2c 20 74 | 6f 20 65 6c 69 6d 69 6e |ments, t|o elimin|
|00004fd0| 61 74 65 20 74 68 65 20 | 6e 65 65 64 20 66 6f 72 |ate the |need for|
|00004fe0| 0d 0a 6c 6f 6e 67 20 73 | 61 6d 70 6c 65 73 2e 0d |..long s|amples..|
|00004ff0| 0a 0d 0a 47 4d 50 6c 61 | 79 65 72 20 69 73 20 6e |...GMPla|yer is n|
|00005000| 6f 74 20 64 65 70 65 6e | 64 65 6e 74 20 6f 6e 20 |ot depen|dent on |
|00005010| 74 68 65 20 75 6e 64 65 | 72 6c 79 69 6e 67 20 73 |the unde|rlying s|
|00005020| 6f 75 6e 64 20 68 61 72 | 64 77 61 72 65 20 2d 2d |ound har|dware --|
|00005030| 2d 20 69 74 20 6f 70 65 | 72 61 74 65 73 20 61 73 |- it ope|rates as|
|00005040| 0d 0a 65 61 73 69 6c 79 | 20 77 69 74 68 20 6e 6f |..easily| with no|
|00005050| 20 73 6f 75 6e 64 20 6f | 75 74 70 75 74 20 61 74 | sound o|utput at|
|00005060| 20 61 6c 6c 20 61 73 20 | 69 74 20 64 6f 65 73 20 | all as |it does |
|00005070| 77 69 74 68 20 61 6e 20 | 61 64 76 61 6e 63 65 64 |with an |advanced|
|00005080| 20 77 61 76 65 74 61 62 | 6c 65 0d 0a 73 6f 75 6e | wavetab|le..soun|
|00005090| 64 20 63 61 72 64 2e 20 | 41 74 20 69 6e 69 74 69 |d card. |At initi|
|000050a0| 61 6c 69 7a 61 74 69 6f | 6e 20 70 68 61 73 65 2c |alizatio|n phase,|
|000050b0| 20 47 4d 50 6c 61 79 65 | 72 20 69 73 20 70 61 73 | GMPlaye|r is pas|
|000050c0| 73 65 64 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f |sed a po|inter to|
|000050d0| 20 74 68 65 0d 0a 53 6f | 75 6e 64 20 44 65 76 69 | the..So|und Devi|
|000050e0| 63 65 20 74 68 61 74 20 | 73 68 6f 75 6c 64 20 62 |ce that |should b|
|000050f0| 65 20 75 73 65 64 20 66 | 6f 72 20 6d 75 73 69 63 |e used f|or music|
|00005100| 20 70 6c 61 79 62 61 63 | 6b 2c 20 61 6e 64 20 61 | playbac|k, and a|
|00005110| 66 74 65 72 77 61 72 64 | 73 20 69 74 0d 0a 64 69 |fterward|s it..di|
|00005120| 72 65 63 74 73 20 61 6c | 6c 20 73 6f 75 6e 64 73 |rects al|l sounds|
|00005130| 20 74 6f 20 74 68 61 74 | 20 53 6f 75 6e 64 20 44 | to that| Sound D|
|00005140| 65 76 69 63 65 2e 0d 0a | 0d 0a 0d 0a 5c 73 75 62 |evice...|....\sub|
|00005150| 73 65 63 74 69 6f 6e 7b | 4d 49 44 41 53 20 6b 65 |section{|MIDAS ke|
|00005160| 72 6e 65 6c 7d 0d 0a 0d | 0a 54 68 65 20 4d 49 44 |rnel}...|.The MID|
|00005170| 41 53 20 22 6b 65 72 6e | 65 6c 22 20 63 6f 6e 73 |AS "kern|el" cons|
|00005180| 69 73 74 73 20 6f 66 20 | 73 6d 61 6c 6c 65 72 20 |ists of |smaller |
|00005190| 6d 6f 64 75 6c 65 73 20 | 75 73 65 64 20 62 79 20 |modules |used by |
|000051a0| 61 6c 6c 20 73 79 73 74 | 65 6d 20 63 6f 6d 70 6f |all syst|em compo|
|000051b0| 6e 65 6e 74 73 2e 0d 0a | 54 68 69 73 20 69 6e 63 |nents...|This inc|
|000051c0| 6c 75 64 65 73 20 25 54 | 4f 44 4f 3a 6c 69 6e 6b |ludes %T|ODO:link|
|000051d0| 73 0d 0a 6d 65 6d 6f 72 | 79 20 6d 61 6e 61 67 65 |s..memor|y manage|
|000051e0| 6d 65 6e 74 20 66 75 6e | 63 74 69 6f 6e 73 2c 20 |ment fun|ctions, |
|000051f0| 65 72 72 6f 72 20 68 61 | 6e 64 6c 69 6e 67 20 72 |error ha|ndling r|
|00005200| 6f 75 74 69 6e 65 73 2c | 20 66 69 6c 65 20 6d 61 |outines,| file ma|
|00005210| 6e 61 67 65 6d 65 6e 74 | 0d 0a 66 75 6e 63 74 69 |nagement|..functi|
|00005220| 6f 6e 73 20 61 6e 64 20 | 63 6f 6d 6d 6f 6e 20 75 |ons and |common u|
|00005230| 74 69 6c 69 74 79 20 66 | 75 6e 63 74 69 6f 6e 73 |tility f|unctions|
|00005240| 2e 20 54 68 65 73 65 20 | 6b 65 72 6e 65 6c 20 66 |. These |kernel f|
|00005250| 75 6e 63 74 69 6f 6e 73 | 20 65 6e 73 75 72 65 20 |unctions| ensure |
|00005260| 74 68 61 74 0d 0a 4d 49 | 44 41 53 20 64 6f 65 73 |that..MI|DAS does|
|00005270| 20 6e 6f 74 20 64 65 70 | 65 6e 64 20 6f 6e 20 74 | not dep|end on t|
|00005280| 68 65 20 75 6e 64 65 72 | 6c 79 69 6e 67 20 6f 70 |he under|lying op|
|00005290| 65 72 61 74 69 6e 67 20 | 73 79 73 74 65 6d 20 61 |erating |system a|
|000052a0| 6e 79 20 43 20 72 75 6e | 74 69 6d 65 0d 0a 6c 69 |ny C run|time..li|
|000052b0| 62 72 61 72 69 65 73 20 | 2d 2d 2d 20 61 6c 6c 20 |braries |--- all |
|000052c0| 64 65 70 65 6e 64 65 6e | 63 69 65 73 20 61 72 65 |dependen|cies are|
|000052d0| 20 65 6e 63 61 70 73 75 | 6c 61 74 65 64 20 69 6e | encapsu|lated in|
|000052e0| 20 73 69 6e 67 6c 65 20 | 6d 6f 64 75 6c 65 73 2e | single |modules.|
|000052f0| 0d 0a 0d 0a 0d 0a 0d 0a | 5c 73 65 63 74 69 6f 6e |........|\section|
|00005300| 7b 43 61 6c 6c 69 6e 67 | 20 63 6f 6e 76 65 6e 74 |{Calling| convent|
|00005310| 69 6f 6e 73 7d 0d 0a 0d | 0a 41 6c 6c 20 69 6e 74 |ions}...|.All int|
|00005320| 65 72 6e 61 6c 20 4d 49 | 44 41 53 20 53 6f 75 6e |ernal MI|DAS Soun|
|00005330| 64 20 53 79 73 74 65 6d | 20 66 75 6e 63 74 69 6f |d System| functio|
|00005340| 6e 73 20 75 73 65 20 74 | 68 65 20 73 61 6d 65 20 |ns use t|he same |
|00005350| 63 61 6c 6c 69 6e 67 20 | 63 6f 6e 76 65 6e 74 69 |calling |conventi|
|00005360| 6f 6e 73 20 61 6e 64 0d | 0a 61 20 73 69 6d 69 6c |ons and.|.a simil|
|00005370| 61 72 20 6d 65 74 68 6f | 64 20 66 6f 72 20 72 65 |ar metho|d for re|
|00005380| 74 75 72 6e 69 6e 67 20 | 64 61 74 61 2e 20 54 68 |turning |data. Th|
|00005390| 69 73 20 73 69 6d 70 6c | 69 66 69 65 73 20 70 72 |is simpl|ifies pr|
|000053a0| 6f 67 72 61 6d 6d 69 6e | 67 2c 20 61 73 20 61 6c |ogrammin|g, as al|
|000053b0| 6c 0d 0a 66 75 6e 63 74 | 69 6f 6e 73 20 62 65 68 |l..funct|ions beh|
|000053c0| 61 76 65 20 63 6f 6e 73 | 69 73 74 65 6e 74 6c 79 |ave cons|istently|
|000053d0| 2c 20 61 6e 64 20 65 6e | 73 75 72 65 73 20 74 68 |, and en|sures th|
|000053e0| 61 74 20 65 72 72 6f 72 | 20 63 6f 64 65 73 20 67 |at error| codes g|
|000053f0| 65 74 20 68 61 6e 64 6c | 65 64 0d 0a 70 72 6f 70 |et handl|ed..prop|
|00005400| 65 72 6c 79 2e 0d 0a 0d | 0a 5c 73 75 62 73 65 63 |erly....|.\subsec|
|00005410| 74 69 6f 6e 7b 45 72 72 | 6f 72 20 63 6f 64 65 73 |tion{Err|or codes|
|00005420| 7d 0d 0a 0d 0a 41 6c 6c | 20 66 75 6e 63 74 69 6f |}....All| functio|
|00005430| 6e 73 20 69 6e 20 4d 49 | 44 41 53 20 53 6f 75 6e |ns in MI|DAS Soun|
|00005440| 64 20 53 79 73 74 65 6d | 20 72 65 74 75 72 6e 20 |d System| return |
|00005450| 61 6e 20 65 72 72 6f 72 | 20 63 6f 64 65 2e 20 54 |an error| code. T|
|00005460| 68 65 72 65 20 69 73 20 | 6e 6f 0d 0a 65 78 63 65 |here is |no..exce|
|00005470| 70 74 69 6f 6e 20 74 6f | 20 74 68 69 73 2c 20 61 |ption to| this, a|
|00005480| 6e 64 20 61 6c 6c 20 6f | 74 68 65 72 20 64 61 74 |nd all o|ther dat|
|00005490| 61 20 69 73 20 72 65 74 | 75 72 6e 65 64 20 75 73 |a is ret|urned us|
|000054a0| 69 6e 67 20 70 6f 69 6e | 74 65 72 73 20 28 73 65 |ing poin|ters (se|
|000054b0| 65 20 62 65 6c 6f 77 29 | 2e 0d 0a 54 68 69 73 20 |e below)|...This |
|000054c0| 73 69 6d 70 6c 69 66 69 | 65 73 20 65 72 72 6f 72 |simplifi|es error|
|000054d0| 20 68 61 6e 64 6c 69 6e | 67 2c 20 61 6e 64 20 6d | handlin|g, and m|
|000054e0| 61 6b 65 73 20 73 75 72 | 65 20 65 72 72 6f 72 20 |akes sur|e error |
|000054f0| 63 6f 64 65 73 20 61 6c | 77 61 79 73 20 67 65 74 |codes al|ways get|
|00005500| 20 68 61 6e 64 6c 65 64 | 0d 0a 70 72 6f 70 65 72 | handled|..proper|
|00005510| 6c 79 2e 20 49 6e 20 61 | 64 64 69 74 69 6f 6e 2c |ly. In a|ddition,|
|00005520| 20 77 68 65 6e 20 4d 49 | 44 41 53 20 69 73 20 63 | when MI|DAS is c|
|00005530| 6f 6d 70 69 6c 65 64 20 | 77 69 74 68 20 44 45 42 |ompiled |with DEB|
|00005540| 55 47 20 6d 6f 64 65 20 | 6f 6e 2c 20 74 68 65 20 |UG mode |on, the |
|00005550| 65 72 72 6f 72 0d 0a 68 | 61 6e 64 6c 69 6e 67 20 |error..h|andling |
|00005560| 66 75 6e 63 74 69 6f 6e | 73 20 63 61 6e 20 73 75 |function|s can su|
|00005570| 70 70 6c 79 20 64 65 74 | 61 69 6c 65 64 20 69 6e |pply det|ailed in|
|00005580| 66 6f 72 6d 61 74 69 6f | 6e 20 61 62 6f 75 74 20 |formatio|n about |
|00005590| 74 68 65 20 65 72 72 6f | 72 73 20 74 68 61 74 0d |the erro|rs that.|
|000055a0| 0a 68 61 70 70 65 6e 65 | 64 2c 20 73 75 63 68 20 |.happene|d, such |
|000055b0| 61 73 20 77 68 69 63 68 | 20 66 75 6e 63 74 69 6f |as which| functio|
|000055c0| 6e 20 6f 72 69 67 69 6e | 61 6c 6c 79 20 63 61 75 |n origin|ally cau|
|000055d0| 73 65 64 20 74 68 65 20 | 65 72 72 6f 72 20 61 6e |sed the |error an|
|000055e0| 64 20 77 68 61 74 0d 0a | 66 75 6e 63 74 69 6f 6e |d what..|function|
|000055f0| 73 20 63 61 6c 6c 65 64 | 20 69 74 2e 0d 0a 0d 0a |s called| it.....|
|00005600| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 52 65 74 75 |\subsect|ion{Retu|
|00005610| 72 6e 69 6e 67 20 64 61 | 74 61 7d 0d 0a 0d 0a 41 |rning da|ta}....A|
|00005620| 73 20 74 68 65 20 72 65 | 74 75 72 6e 20 76 61 6c |s the re|turn val|
|00005630| 75 65 20 6f 66 20 74 68 | 65 20 66 75 6e 63 74 69 |ue of th|e functi|
|00005640| 6f 6e 20 69 73 20 61 6c | 77 61 79 73 20 72 65 73 |on is al|ways res|
|00005650| 65 72 76 65 64 20 66 6f | 72 20 74 68 65 20 65 72 |erved fo|r the er|
|00005660| 72 6f 72 20 63 6f 64 65 | 2c 0d 0a 61 6c 6c 20 6f |ror code|,..all o|
|00005670| 74 68 65 72 20 64 61 74 | 61 20 77 69 6c 6c 20 6e |ther dat|a will n|
|00005680| 65 65 64 20 74 6f 20 62 | 65 20 72 65 74 75 72 6e |eed to b|e return|
|00005690| 65 64 20 62 79 20 75 73 | 69 6e 67 20 70 6f 69 6e |ed by us|ing poin|
|000056a0| 74 65 72 73 2e 20 41 6c | 6c 20 4d 49 44 41 53 0d |ters. Al|l MIDAS.|
|000056b0| 0a 66 75 6e 63 74 69 6f | 6e 73 20 74 68 61 74 20 |.functio|ns that |
|000056c0| 72 65 74 75 72 6e 20 64 | 61 74 61 20 77 69 6c 6c |return d|ata will|
|000056d0| 20 61 63 63 65 70 74 20 | 61 73 20 74 68 65 69 72 | accept |as their|
|000056e0| 20 6c 61 73 74 20 61 72 | 67 75 6d 65 6e 74 73 20 | last ar|guments |
|000056f0| 70 6f 69 6e 74 65 72 73 | 20 74 6f 0d 0a 74 68 65 |pointers| to..the|
|00005700| 20 76 61 72 69 61 62 6c | 65 73 20 74 68 61 74 20 | variabl|es that |
|00005710| 77 69 6c 6c 20 68 6f 6c | 64 20 74 68 65 20 72 65 |will hol|d the re|
|00005720| 74 75 72 6e 20 76 61 6c | 75 65 73 2e 20 4d 61 6b |turn val|ues. Mak|
|00005730| 65 20 73 75 72 65 20 79 | 6f 75 20 7b 5c 62 66 20 |e sure y|ou {\bf |
|00005740| 61 6c 77 61 79 73 7d 0d | 0a 70 61 73 73 20 74 68 |always}.|.pass th|
|00005750| 65 73 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 6c 65 |ese func|tions le|
|00005760| 67 61 6c 20 70 6f 69 6e | 74 65 72 73 20 61 73 20 |gal poin|ters as |
|00005770| 74 68 65 20 72 65 74 75 | 72 6e 20 76 61 72 69 61 |the retu|rn varia|
|00005780| 62 6c 65 73 20 65 76 65 | 6e 20 69 66 20 79 6f 75 |bles eve|n if you|
|00005790| 20 64 6f 6e 27 74 0d 0a | 6e 65 65 64 20 74 68 65 | don't..|need the|
|000057a0| 20 72 65 74 75 72 6e 20 | 76 61 6c 75 65 73 20 2d | return |values -|
|000057b0| 2d 2d 20 6d 65 6d 6f 72 | 79 20 63 6f 72 72 75 70 |-- memor|y corrup|
|000057c0| 74 69 6f 6e 20 6d 61 79 | 20 6f 63 63 75 72 20 6f |tion may| occur o|
|000057d0| 74 68 65 72 77 69 73 65 | 2e 0d 0a 0d 0a 46 6f 72 |therwise|.....For|
|000057e0| 20 65 78 61 6d 70 6c 65 | 2c 20 74 6f 20 71 75 65 | example|, to que|
|000057f0| 72 79 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 76 |ry the c|urrent v|
|00005800| 6f 6c 75 6d 65 20 6f 6e | 20 63 68 61 6e 6e 65 6c |olume on| channel|
|00005810| 20 33 20 69 6e 20 74 68 | 65 20 64 65 66 61 75 6c | 3 in th|e defaul|
|00005820| 74 20 53 6f 75 6e 64 0d | 0a 44 65 76 69 63 65 2c |t Sound.|.Device,|
|00005830| 20 79 6f 75 20 63 61 6e | 20 75 73 65 3a 0d 0a 0d | you can| use:...|
|00005840| 0a 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|00005850| 7d 0d 0a 75 6e 73 69 67 | 6e 65 64 20 76 6f 6c 3b |}..unsig|ned vol;|
|00005860| 0d 0a 2e 2e 2e 0d 0a 6d | 69 64 61 73 53 44 2d 3e |.......m|idasSD->|
|00005870| 47 65 74 56 6f 6c 75 6d | 65 28 33 2c 20 26 76 6f |GetVolum|e(3, &vo|
|00005880| 6c 29 3b 0d 0a 2e 2e 2e | 0d 0a 5c 65 6e 64 7b 76 |l);.....|..\end{v|
|00005890| 65 72 62 61 74 69 6d 7d | 0d 0a 0d 0a 4e 6f 74 65 |erbatim}|....Note|
|000058a0| 20 74 68 61 74 20 69 6e | 20 61 20 72 65 61 6c 2d | that in| a real-|
|000058b0| 6c 69 66 65 20 70 72 6f | 67 72 61 6d 20 79 6f 75 |life pro|gram you|
|000058c0| 20 61 6c 73 6f 20 6e 65 | 65 64 20 74 6f 20 68 61 | also ne|ed to ha|
|000058d0| 6e 64 6c 65 20 74 68 65 | 20 72 65 74 75 72 6e 65 |ndle the| returne|
|000058e0| 64 20 65 72 72 6f 72 0d | 0a 63 6f 64 65 2e 0d 0a |d error.|.code...|
|000058f0| 0d 0a 5b 54 4f 44 4f 3a | 4f 53 2d 53 70 65 63 69 |..[TODO:|OS-Speci|
|00005900| 66 69 63 5d 20 7b 5c 62 | 66 20 4d 53 2d 44 4f 53 |fic] {\b|f MS-DOS|
|00005910| 20 4e 6f 74 65 21 7d 20 | 43 6f 64 65 20 75 73 69 | Note!} |Code usi|
|00005920| 6e 67 20 4d 49 44 41 53 | 20 6e 65 65 64 73 20 74 |ng MIDAS| needs t|
|00005930| 6f 20 68 61 76 65 20 74 | 68 65 0d 0a 63 6f 6d 70 |o have t|he..comp|
|00005940| 69 6c 65 72 20 27 27 53 | 53 3d 3d 44 53 27 27 20 |iler ''S|S==DS'' |
|00005950| 2d 61 73 73 75 6d 70 74 | 69 6f 6e 20 64 69 73 61 |-assumpt|ion disa|
|00005960| 62 6c 65 64 2e 20 54 68 | 69 73 20 69 73 20 62 65 |bled. Th|is is be|
|00005970| 63 61 75 73 65 20 74 68 | 65 20 73 74 61 63 6b 20 |cause th|e stack |
|00005980| 75 73 65 64 20 62 79 0d | 0a 74 68 65 20 74 69 6d |used by.|.the tim|
|00005990| 65 72 20 69 6e 74 65 72 | 72 75 70 74 20 28 61 6e |er inter|rupt (an|
|000059a0| 64 20 74 68 75 73 20 6d | 6f 73 74 20 6f 66 20 4d |d thus m|ost of M|
|000059b0| 49 44 41 53 20 63 6f 64 | 65 20 70 6c 75 73 20 61 |IDAS cod|e plus a|
|000059c0| 6e 79 20 75 73 65 72 20 | 63 61 6c 6c 62 61 63 6b |ny user |callback|
|000059d0| 73 29 0d 0a 6d 69 67 68 | 74 20 62 65 20 64 69 66 |s)..migh|t be dif|
|000059e0| 66 65 72 65 6e 74 20 66 | 72 6f 6d 20 74 68 65 20 |ferent f|rom the |
|000059f0| 6d 61 69 6e 20 70 72 6f | 67 72 61 6d 20 73 74 61 |main pro|gram sta|
|00005a00| 63 6b 2c 20 61 6e 64 20 | 74 68 65 20 63 6f 6d 70 |ck, and |the comp|
|00005a10| 69 6c 65 72 20 73 68 6f | 75 6c 64 0d 0a 74 68 65 |iler sho|uld..the|
|00005a20| 72 65 66 6f 72 65 20 6e | 6f 74 20 67 65 6e 65 72 |refore n|ot gener|
|00005a30| 61 74 65 20 63 6f 64 65 | 20 74 68 61 74 20 75 73 |ate code| that us|
|00005a40| 65 73 20 64 61 74 61 20 | 73 65 67 6d 65 6e 74 20 |es data |segment |
|00005a50| 76 61 72 69 61 62 6c 65 | 73 20 76 69 61 20 74 68 |variable|s via th|
|00005a60| 65 20 73 74 61 63 6b 0d | 0a 73 65 67 6d 65 6e 74 |e stack.|.segment|
|00005a70| 2e 20 42 65 63 61 75 73 | 65 20 6f 66 20 74 68 69 |. Becaus|e of thi|
|00005a80| 73 2c 20 61 6e 79 20 70 | 6f 69 6e 74 65 72 73 20 |s, any p|ointers |
|00005a90| 74 68 61 74 20 79 6f 75 | 20 70 61 73 73 20 74 6f |that you| pass to|
|00005aa0| 20 4d 49 44 41 53 20 66 | 75 6e 63 74 69 6f 6e 73 | MIDAS f|unctions|
|00005ab0| 20 6e 65 65 64 0d 0a 74 | 6f 20 70 6f 69 6e 74 20 | need..t|o point |
|00005ac0| 74 6f 20 64 61 74 61 20 | 73 65 67 6d 65 6e 74 20 |to data |segment |
|00005ad0| 76 61 72 69 61 62 6c 65 | 73 20 2d 2d 2d 20 69 6e |variable|s --- in|
|00005ae0| 20 6f 74 68 65 72 20 77 | 6f 72 64 73 2c 20 69 6e | other w|ords, in|
|00005af0| 20 74 68 65 20 65 78 61 | 6d 70 6c 65 20 61 62 6f | the exa|mple abo|
|00005b00| 76 65 2c 0d 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 |ve,..\be|gin{verb|
|00005b10| 61 74 69 6d 7d 0d 0a 75 | 6e 73 69 67 6e 65 64 20 |atim}..u|nsigned |
|00005b20| 76 6f 6c 3b 0d 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |vol;..\e|nd{verba|
|00005b30| 74 69 6d 7d 0d 0a 6e 65 | 65 64 73 20 74 6f 20 62 |tim}..ne|eds to b|
|00005b40| 65 20 63 68 61 6e 67 65 | 64 20 74 6f 0d 0a 5c 62 |e change|d to..\b|
|00005b50| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0d 0a |egin{ver|batim}..|
|00005b60| 73 74 61 74 69 63 20 75 | 6e 73 69 67 6e 65 64 20 |static u|nsigned |
|00005b70| 76 6f 6c 3b 0d 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |vol;..\e|nd{verba|
|00005b80| 74 69 6d 7d 0d 0a 74 6f | 20 65 6e 73 75 72 65 20 |tim}..to| ensure |
|00005b90| 74 68 65 20 6c 6f 63 61 | 6c 20 76 61 72 69 61 62 |the loca|l variab|
|00005ba0| 6c 65 20 67 65 74 73 20 | 70 6c 61 63 65 64 20 69 |le gets |placed i|
|00005bb0| 6e 20 64 61 74 61 20 73 | 65 67 6d 65 6e 74 2e 20 |n data s|egment. |
|00005bc0| 50 6f 69 6e 74 65 72 73 | 20 74 6f 20 67 6c 6f 62 |Pointers| to glob|
|00005bd0| 61 6c 0d 0a 76 61 72 69 | 61 62 6c 65 73 20 63 61 |al..vari|ables ca|
|00005be0| 6e 20 6e 61 74 75 72 61 | 6c 6c 79 20 62 65 20 75 |n natura|lly be u|
|00005bf0| 73 65 64 20 77 69 74 68 | 6f 75 74 20 61 6e 79 20 |sed with|out any |
|00005c00| 6d 6f 64 69 66 69 63 61 | 74 69 6f 6e 73 2e 0d 0a |modifica|tions...|
|00005c10| 0d 0a 0d 0a 5c 73 65 63 | 74 69 6f 6e 7b 45 72 72 |....\sec|tion{Err|
|00005c20| 6f 72 20 68 61 6e 64 6c | 69 6e 67 7d 0d 0a 0d 0a |or handl|ing}....|
|00005c30| 54 68 65 20 73 65 63 74 | 69 6f 6e 20 61 62 6f 76 |The sect|ion abov|
|00005c40| 65 20 61 6c 72 65 61 64 | 79 20 67 61 76 65 20 61 |e alread|y gave a|
|00005c50| 20 62 72 69 65 66 20 69 | 6e 74 72 6f 64 75 63 74 | brief i|ntroduct|
|00005c60| 69 6f 6e 20 74 6f 20 4d | 49 44 41 53 20 65 72 72 |ion to M|IDAS err|
|00005c70| 6f 72 20 68 61 6e 64 6c | 69 6e 67 2c 0d 0a 62 75 |or handl|ing,..bu|
|00005c80| 74 20 74 68 69 73 20 73 | 65 63 74 69 6f 6e 20 77 |t this s|ection w|
|00005c90| 69 6c 6c 20 64 65 73 63 | 72 69 62 65 20 69 74 20 |ill desc|ribe it |
|00005ca0| 69 6e 20 64 65 74 61 69 | 6c 2e 0d 0a 0d 0a 4d 49 |in detai|l.....MI|
|00005cb0| 44 41 53 20 75 73 65 73 | 20 61 20 63 6f 6d 6d 6f |DAS uses| a commo|
|00005cc0| 6e 20 6d 65 74 68 6f 64 | 20 66 6f 72 20 68 61 6e |n method| for han|
|00005cd0| 64 6c 69 6e 67 20 65 72 | 72 6f 72 73 20 74 68 72 |dling er|rors thr|
|00005ce0| 6f 75 67 68 6f 75 74 20 | 74 68 65 20 73 79 73 74 |oughout |the syst|
|00005cf0| 65 6d 2e 20 41 6c 6c 0d | 0a 66 75 6e 63 74 69 6f |em. All.|.functio|
|00005d00| 6e 73 20 72 65 74 75 72 | 6e 20 61 6e 20 65 72 72 |ns retur|n an err|
|00005d10| 6f 72 20 63 6f 64 65 2c | 20 61 6e 64 20 69 74 20 |or code,| and it |
|00005d20| 69 73 20 75 70 20 74 6f | 20 74 68 65 20 63 61 6c |is up to| the cal|
|00005d30| 6c 65 72 20 74 6f 20 64 | 65 63 69 64 65 20 68 6f |ler to d|ecide ho|
|00005d40| 77 20 74 6f 0d 0a 68 61 | 6e 64 6c 65 20 74 68 65 |w to..ha|ndle the|
|00005d50| 20 65 72 72 6f 72 20 63 | 6f 6e 64 69 74 69 6f 6e | error c|ondition|
|00005d60| 2e 20 4d 6f 73 74 20 66 | 75 6e 63 74 69 6f 6e 73 |. Most f|unctions|
|00005d70| 20 73 69 6d 70 6c 79 20 | 70 61 73 73 20 74 68 65 | simply |pass the|
|00005d80| 20 65 72 72 6f 72 20 63 | 6f 64 65 20 74 6f 0d 0a | error c|ode to..|
|00005d90| 74 68 65 69 72 20 63 61 | 6c 6c 65 72 2c 20 62 75 |their ca|ller, bu|
|00005da0| 74 20 69 74 20 69 73 20 | 72 65 63 6f 6d 6d 65 6e |t it is |recommen|
|00005db0| 64 65 64 20 74 68 61 74 | 20 74 68 65 20 66 75 6e |ded that| the fun|
|00005dc0| 63 74 69 6f 6e 20 64 6f | 65 73 20 61 73 20 6d 75 |ction do|es as mu|
|00005dd0| 63 68 20 63 6c 65 61 6e | 2d 75 70 0d 0a 61 73 20 |ch clean|-up..as |
|00005de0| 70 6f 73 73 69 62 6c 65 | 20 62 65 66 6f 72 65 20 |possible| before |
|00005df0| 64 6f 69 6e 67 20 73 6f | 2e 20 49 6e 20 70 61 72 |doing so|. In par|
|00005e00| 74 69 63 75 6c 61 72 2c | 20 61 6c 6c 20 61 6c 6c |ticular,| all all|
|00005e10| 6f 63 61 74 65 64 20 6d | 65 6d 6f 72 79 20 73 68 |ocated m|emory sh|
|00005e20| 6f 75 6c 64 20 62 65 0d | 0a 64 65 61 6c 6c 6f 63 |ould be.|.dealloc|
|00005e30| 61 74 65 64 20 61 6e 64 | 20 61 6c 6c 20 6f 70 65 |ated and| all ope|
|00005e40| 6e 20 66 69 6c 65 73 20 | 63 6c 6f 73 65 64 2e 0d |n files |closed..|
|00005e50| 0a 0d 0a 57 68 65 6e 20 | 4d 49 44 41 53 20 69 73 |...When |MIDAS is|
|00005e60| 20 63 6f 6d 70 69 6c 65 | 64 20 69 6e 20 44 45 42 | compile|d in DEB|
|00005e70| 55 47 20 6d 6f 64 65 2c | 20 74 68 65 20 65 72 72 |UG mode,| the err|
|00005e80| 6f 72 20 68 61 6e 64 6c | 69 6e 67 20 73 79 73 74 |or handl|ing syst|
|00005e90| 65 6d 20 68 61 73 0d 0a | 61 64 64 69 74 69 6f 6e |em has..|addition|
|00005ea0| 61 6c 20 66 75 6e 63 74 | 69 6f 6e 61 6c 69 74 79 |al funct|ionality|
|00005eb0| 2e 20 49 74 20 77 69 6c | 6c 20 62 75 69 6c 64 20 |. It wil|l build |
|00005ec0| 75 70 20 61 20 6c 69 73 | 74 20 6f 66 20 61 6c 6c |up a lis|t of all|
|00005ed0| 20 65 72 72 6f 72 73 20 | 74 68 61 74 0d 0a 6f 63 | errors |that..oc|
|00005ee0| 63 75 72 72 65 64 2c 20 | 77 69 74 68 20 74 68 65 |curred, |with the|
|00005ef0| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 66 75 6e | name of| the fun|
|00005f00| 63 74 69 6f 6e 20 74 68 | 61 74 20 72 61 69 73 65 |ction th|at raise|
|00005f10| 64 20 74 68 65 20 65 72 | 72 6f 72 2e 20 57 68 65 |d the er|ror. Whe|
|00005f20| 6e 20 65 72 72 6f 72 73 | 0d 0a 61 72 65 20 74 68 |n errors|..are th|
|00005f30| 65 6e 20 70 61 73 73 65 | 64 20 75 70 77 61 72 64 |en passe|d upward|
|00005f40| 73 20 69 6e 20 74 68 65 | 20 66 75 6e 63 74 69 6f |s in the| functio|
|00005f50| 6e 20 63 61 6c 6c 20 73 | 74 61 63 6b 2c 20 61 6c |n call s|tack, al|
|00005f60| 6c 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 72 65 20 |l functi|ons are |
|00005f70| 61 64 64 65 64 0d 0a 74 | 6f 20 74 68 65 20 6c 69 |added..t|o the li|
|00005f80| 73 74 2e 20 54 68 75 73 | 20 74 68 65 20 65 72 72 |st. Thus| the err|
|00005f90| 6f 72 20 65 78 69 74 20 | 6e 6f 74 20 6f 6e 6c 79 |or exit |not only|
|00005fa0| 20 72 65 70 6f 72 74 73 | 20 77 68 61 74 20 65 72 | reports| what er|
|00005fb0| 72 6f 72 20 6f 63 63 75 | 72 72 65 64 2c 20 62 75 |ror occu|rred, bu|
|00005fc0| 74 0d 0a 61 6c 73 6f 20 | 77 68 61 74 20 66 75 6e |t..also |what fun|
|00005fd0| 63 74 69 6f 6e 20 63 61 | 75 73 65 64 20 74 68 65 |ction ca|used the|
|00005fe0| 20 65 72 72 6f 72 20 61 | 6e 64 20 77 68 65 72 65 | error a|nd where|
|00005ff0| 20 69 74 20 77 61 73 20 | 63 61 6c 6c 65 64 2e 0d | it was |called..|
|00006000| 0a 0d 0a 0d 0a 0d 0a 5c | 63 68 61 70 74 65 72 7b |.......\|chapter{|
|00006010| 4f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |Operatin|g system|
|00006020| 20 73 70 65 63 69 66 69 | 63 20 69 6e 66 6f 72 6d | specifi|c inform|
|00006030| 61 74 69 6f 6e 7d 0d 0a | 0d 0a 41 6c 74 68 6f 75 |ation}..|..Althou|
|00006040| 67 68 20 74 68 65 20 6e | 6f 72 6d 61 6c 20 4d 49 |gh the n|ormal MI|
|00006050| 44 41 53 20 41 50 49 73 | 20 61 72 65 20 69 6e 64 |DAS APIs| are ind|
|00006060| 65 6e 74 69 63 61 6c 20 | 69 6e 20 61 6c 6c 20 73 |entical |in all s|
|00006070| 75 70 70 6f 72 74 65 64 | 20 70 6c 61 74 66 6f 72 |upported| platfor|
|00006080| 6d 73 2c 0d 0a 74 68 65 | 72 65 20 61 72 65 20 73 |ms,..the|re are s|
|00006090| 6f 6d 65 20 6f 70 65 72 | 61 74 69 6e 67 20 73 79 |ome oper|ating sy|
|000060a0| 73 74 65 6d 20 73 70 65 | 63 69 66 69 63 20 70 6f |stem spe|cific po|
|000060b0| 69 6e 74 73 20 74 68 61 | 74 20 73 68 6f 75 6c 64 |ints tha|t should|
|000060c0| 20 62 65 20 6e 6f 74 65 | 64 2e 20 49 6e 0d 0a 70 | be note|d. In..p|
|000060d0| 61 72 74 69 63 75 6c 61 | 72 2c 20 74 68 65 20 6c |articula|r, the l|
|000060e0| 69 6d 69 74 61 74 69 6f | 6e 73 20 6f 66 20 74 68 |imitatio|ns of th|
|000060f0| 65 20 4d 53 2d 44 4f 53 | 20 6f 70 65 72 61 74 69 |e MS-DOS| operati|
|00006100| 6e 67 20 73 79 73 74 65 | 6d 20 6d 61 6b 65 20 69 |ng syste|m make i|
|00006110| 74 20 73 6f 6d 65 77 68 | 61 74 0d 0a 64 69 66 66 |t somewh|at..diff|
|00006120| 69 63 75 6c 74 20 74 6f | 20 70 72 6f 67 72 61 6d |icult to| program|
|00006130| 20 75 6e 64 65 72 2e 0d | 0a 0d 0a 0d 0a 5c 73 65 | under..|.....\se|
|00006140| 63 74 69 6f 6e 7b 4d 53 | 2d 44 4f 53 20 74 69 6d |ction{MS|-DOS tim|
|00006150| 65 72 20 73 63 72 65 65 | 6e 20 73 79 6e 63 68 72 |er scree|n synchr|
|00006160| 6f 6e 69 7a 61 74 69 6f | 6e 7d 0d 0a 0d 0a 54 68 |onizatio|n}....Th|
|00006170| 69 73 20 73 65 63 74 69 | 6f 6e 20 64 65 73 63 72 |is secti|on descr|
|00006180| 69 62 65 73 20 68 6f 77 | 20 74 6f 20 75 73 65 20 |ibes how| to use |
|00006190| 74 68 65 20 62 75 69 6c | 74 2d 69 6e 20 4d 49 44 |the buil|t-in MID|
|000061a0| 41 53 20 73 63 72 65 65 | 6e 20 73 79 6e 63 68 72 |AS scree|n synchr|
|000061b0| 6f 6e 69 7a 65 64 0d 0a | 74 69 6d 65 72 20 75 6e |onized..|timer un|
|000061c0| 64 65 72 20 4d 53 2d 44 | 4f 53 2e 20 54 68 69 73 |der MS-D|OS. This|
|000061d0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 69 73 20 | informa|tion is |
|000061e0| 6e 6f 74 20 72 65 6c 65 | 76 61 6e 74 20 69 6e 20 |not rele|vant in |
|000061f0| 6f 74 68 65 72 20 6f 70 | 65 72 61 74 69 6e 67 0d |other op|erating.|
|00006200| 0a 73 79 73 74 65 6d 73 | 2e 0d 0a 0d 0a 5c 73 75 |.systems|.....\su|
|00006210| 62 73 65 63 74 69 6f 6e | 7b 49 6e 74 72 6f 64 75 |bsection|{Introdu|
|00006220| 63 74 69 6f 6e 7d 0d 0a | 0d 0a 4d 49 44 41 53 20 |ction}..|..MIDAS |
|00006230| 53 6f 75 6e 64 20 53 79 | 73 74 65 6d 20 74 69 6d |Sound Sy|stem tim|
|00006240| 65 72 20 69 6e 63 6c 75 | 64 65 73 20 62 75 69 6c |er inclu|des buil|
|00006250| 74 2d 69 6e 20 73 75 70 | 70 6f 72 74 20 66 6f 72 |t-in sup|port for|
|00006260| 20 73 63 72 65 65 6e 0d | 0a 73 79 6e 63 68 72 6f | screen.|.synchro|
|00006270| 6e 69 7a 61 74 69 6f 6e | 2e 20 54 68 69 73 20 6d |nization|. This m|
|00006280| 65 61 6e 73 20 74 68 61 | 74 20 79 6f 75 20 63 61 |eans tha|t you ca|
|00006290| 6e 20 70 72 6f 67 72 61 | 6d 20 74 68 65 20 74 69 |n progra|m the ti|
|000062a0| 6d 65 72 20 74 6f 20 63 | 61 6c 6c 20 79 6f 75 72 |mer to c|all your|
|000062b0| 20 6f 77 6e 0d 0a 72 6f | 75 74 69 6e 65 73 20 65 | own..ro|utines e|
|000062c0| 76 65 72 79 20 66 72 61 | 6d 65 2c 20 6d 6f 72 65 |very fra|me, more|
|000062d0| 20 65 78 61 63 74 6c 79 | 20 69 6d 6d 65 64 69 61 | exactly| immedia|
|000062e0| 74 65 6c 79 20 62 65 66 | 6f 72 65 20 74 68 65 20 |tely bef|ore the |
|000062f0| 56 65 72 74 69 63 61 6c | 20 52 65 74 72 61 63 65 |Vertical| Retrace|
|00006300| 2c 0d 0a 69 6d 6d 65 64 | 69 61 74 65 6c 79 20 61 |,..immed|iately a|
|00006310| 66 74 65 72 20 74 68 65 | 20 56 65 72 74 69 63 61 |fter the| Vertica|
|00006320| 6c 20 52 65 74 72 61 63 | 65 20 68 61 73 20 73 74 |l Retrac|e has st|
|00006330| 61 72 74 65 64 20 61 6e | 64 20 6c 61 74 65 72 20 |arted an|d later |
|00006340| 64 75 72 69 6e 67 20 74 | 68 65 0d 0a 56 65 72 74 |during t|he..Vert|
|00006350| 69 63 61 6c 20 52 65 74 | 72 61 63 65 2e 20 54 68 |ical Ret|race. Th|
|00006360| 69 73 20 65 6e 61 62 6c | 65 73 20 79 6f 75 20 74 |is enabl|es you t|
|00006370| 6f 20 73 79 6e 63 68 72 | 6f 6e 69 7a 65 20 79 6f |o synchr|onize yo|
|00006380| 75 72 20 70 72 6f 67 72 | 61 6d 20 74 6f 20 74 68 |ur progr|am to th|
|00006390| 65 20 73 63 72 65 65 6e | 0d 0a 75 70 64 61 74 65 |e screen|..update|
|000063a0| 20 74 6f 20 67 65 74 20 | 73 6d 6f 6f 74 68 20 61 | to get |smooth a|
|000063b0| 6e 69 6d 61 74 69 6f 6e | 2c 20 77 68 69 63 68 20 |nimation|, which |
|000063c0| 6f 74 68 65 72 77 69 73 | 65 20 77 6f 75 6c 64 20 |otherwis|e would |
|000063d0| 6e 6f 74 20 62 65 20 70 | 6f 73 73 69 62 6c 65 20 |not be p|ossible |
|000063e0| 77 69 74 68 20 61 0d 0a | 6d 75 73 69 63 20 73 79 |with a..|music sy|
|000063f0| 73 74 65 6d 20 70 6c 61 | 79 69 6e 67 20 69 6e 20 |stem pla|ying in |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.